Java Selenium Webdriver:元素当前在运行Jenkins时不可见

Java Selenium Webdriver:元素当前在运行Jenkins时不可见,java,jenkins,selenium-webdriver,Java,Jenkins,Selenium 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 elem

基本上,我想单击在单击另一个元素后变为可用的元素:

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']。但是,这在本地运行时工作正常


请尽快回复。

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