Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/385.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
javaselenium-findElementById_Java_Selenium - Fatal编程技术网

javaselenium-findElementById

javaselenium-findElementById,java,selenium,Java,Selenium,我加载了selenium-server-standalone-3.141.59 在尝试编码时,我无法获取方法findElementById()。相反,我得到的只是旧方法findElement() 有人能帮我吗?根据您的需要,您必须使用以下功能: WebElement cheese=driver.findElement(By.id(“cheese”); 否。这是旧版本的。我猜您的版本是什么?what's docs版本是什么?

我加载了
selenium-server-standalone-3.141.59

在尝试编码时,我无法获取方法
findElementById()
。相反,我得到的只是旧方法
findElement()

有人能帮我吗?

根据您的需要,您必须使用以下功能:

WebElement cheese=driver.findElement(By.id(“cheese”);

否。这是旧版本的。我猜您的版本是什么?what's docs版本是什么?