Java 未在instagram中的搜索框中搜索

Java 未在instagram中的搜索框中搜索,java,selenium,Java,Selenium,登录instagram后,我想在searchbox中搜索“tanishq”,但它没有搜索 WebDriverWait wait = new WebDriverWait(driver, 10); WebElement search = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//div[@class='eyXLr wUAXj ']"))); search.click();

登录instagram后,我想在searchbox中搜索“tanishq”,但它没有搜索

 WebDriverWait wait = new WebDriverWait(driver, 10);
         WebElement search = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//div[@class='eyXLr wUAXj ']")));
        search.click();
        search.clear();
        search.sendKeys("tanishq");
        List<WebElement> listofshop = driver.findElements(By.xpath("//div//a//span[@class='Ap253']"));
        for(int k = 0;k<listofshop.size();k++) {
        Thread.sleep(3000);
        List<WebElement> photos = driver.findElements(By.xpath("//div[@class='_9AhH0']"));
        for(int i=0;i<photos.size();i++) {
            photos.get(i).click();
            List<WebElement> tags = driver.findElements(By.xpath("//a[@class='']"));
            for(int j=0;j<tags.size();j++) {
                System.out.println(tags.get(i).getText());
            }
        }
WebDriverWait wait=newwebdriverwait(驱动程序,10);
WebElement search=wait.until(ExpectedConditions.elementToBeClickable(By.xpath(“//div[@class='eyXLr-wUAXj']”));
搜索。单击();
search.clear();
search.sendKeys(“tanishq”);
List listofshop=driver.findelelements(By.xpath(“//div//a//span[@class='Ap253']);

对于(int k=0;k使用actions类并尝试

    Actions actions = new Actions(driver);
    actions.moveToElement(driver.findElements(By.xpath("//div[@class='_9AhH0']"));
    actions.click();
    actions.sendKeys("tanishq");