2014-10-08 55 views
0
运行

基本上我想点击该点击另一个元素后成为可用元素:硒的webdriver:元素当前不可见通过詹金斯

WebElement element; 
element = driver.findElement(By.xpath("//span[@class='btn-expand btn-exp-right hide-text']")); 
element.click(); 

// Below is the explict wait that will wait max 45 seconds for below element. And this element will be only be available after clicking above one. 


action.explictWait(45, By.xpath("//span[@class='btn-plus']")); 
element = driver.findElement(By.xpath("//span[@class='btn-plus']]")); 

// Error this encounter on clicking. 
element.click(); 

通过詹金斯运行虽然我无法点击"//span[@class='btn-plus']]" 。然而,在本地运行时,这工作正常。

请尽快回复。

回答

0

转到jenkin服务器并启动页面,看看该按钮是否可见。