Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.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
Selenium Webdriver-点击Firefox的边缘应用程序_Firefox_Selenium_Click_Webdriver - Fatal编程技术网

Selenium Webdriver-点击Firefox的边缘应用程序

Selenium Webdriver-点击Firefox的边缘应用程序,firefox,selenium,click,webdriver,Firefox,Selenium,Click,Webdriver,我有一个用Edge设计的HTML应用程序。我必须点击一些元素 HTML代码是: <span id="stage_L" style="position: absolute; left: 740px; top: 311px; font-family: Arial,Helvetica,sans-serif; font-size: 134px; color: rgb(255, 158, 36); font-weight: bold; text-decoration: none; opacity:

我有一个用Edge设计的HTML应用程序。我必须点击一些元素

HTML代码是:

<span id="stage_L" style="position: absolute; left: 740px; top: 311px; font-family: Arial,Helvetica,sans-serif; font-size: 134px; color: rgb(255, 158, 36); font-weight: bold; text-decoration: none; opacity: 1; -moz-transform: translate(-580.889px, -106.722px) rotate(0deg) skew(0deg, 0deg) scale(1, 1);" class="ACopy4_id">L</span>
当我手动单击跨度字母时,该字母将高亮显示并播放声音。在IE和Chrome中,自动测试的行为与手动测试一样。但在Firefox上,点击不起作用


有人有什么建议吗?

在上面的示例中,跨度中的id是stage_L,但在下面的方法中查找的id是stage_Z。正确吗?这只是一个输入错误。应该是。idstage\u lar您是否切换到不同浏览器的不同驱动程序类型?即,如果选择了BROWSER.equalsf{System.out.printlnFF;driver=new FirefoxDriver;}如果选择了BROWSER.equalsIE{System.out.printlnIE;driver=new InternetExplorerDriver;}如果选择了BROWSER.equalsHU{System.out.printlnHU;driver=new HtmlUnitDriver;}如果选择了BROWSER.equalsCH{System.out.printlnGoogle chrome被选中;driver=new ChromeDriver;}是的,我这样做了。我在实例化WebDriver部分按照这里的说明进行操作。
driver.findElement(By.id("stage_Z")).click();