VisibilityOfElementLocated硒的Java不phantomjs司机工作

问题描述:

我正在与镀铬司机将下面的代码与Java硒和它的作品对我蛮好:VisibilityOfElementLocated硒的Java不phantomjs司机工作

WebDriverWait wait = new WebDriverWait(driver, 3); 
    wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("buttontofind"))); 
driver.findElement(By.id("buttontofind")).click(); 

然而,当我改变chromedriverphantomjsdriver,并试图执行它我收到以下错误消息:

Expected condition failed: waiting for visibility of element located by By.id: buttontofind (tried for 3 second(s) with 500 MILLISECONDS interval) 

我的问题是以下几点:

driver.findElement(By.id("buttontofind")).sendKeys(Keys.ARROW_DOWN); 

不符合phantomjs做足够的时间,它的工作与镶边似乎少了箭头起伏......

+0

尝试使用无头铬 – iamsankalp89