基本上,我想单击一个在单击另一个元素之后可用的元素:
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();在运行Jenkins时,我无法单击"//span[@class='btn-plus']]"。但是,在本地运行时,这是很好的。
请尽快回复。
发布于 2014-10-08 20:12:09
转到jenkin服务器并启动页面,查看按钮是否可见。
https://stackoverflow.com/questions/26250493
复制相似问题