Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/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
Internet explorer selenium webdriver是否支持在Firefox以外的浏览器中将文本发送到iframe?我面临IE和Chrome的问题_Internet Explorer_Google Chrome_Iframe_Automation_Webdriver - Fatal编程技术网

Internet explorer selenium webdriver是否支持在Firefox以外的浏览器中将文本发送到iframe?我面临IE和Chrome的问题

Internet explorer selenium webdriver是否支持在Firefox以外的浏览器中将文本发送到iframe?我面临IE和Chrome的问题,internet-explorer,google-chrome,iframe,automation,webdriver,Internet Explorer,Google Chrome,Iframe,Automation,Webdriver,上面的代码在Firefox中运行良好,但在IE(元素不可访问)和chrome(元素未找到)中出现异常 Selenium Webdriver是否支持IE 10和chrome 31.0.1650.48 m中的iframe?使用下面的代码访问chrome中的iframe,并且成功了- Driver.driver.switchTo().frame("iframe-user-text-input-div") .findElement(By.xpath("/html/body/font")).s

上面的代码在Firefox中运行良好,但在IE(元素不可访问)和chrome(元素未找到)中出现异常


Selenium Webdriver是否支持IE 10和chrome 31.0.1650.48 m中的iframe?

使用下面的代码访问chrome中的iframe,并且成功了-

Driver.driver.switchTo().frame("iframe-user-text-input-div")
      .findElement(By.xpath("/html/body/font")).sendKeys("dummytext");
Driver.driver.switchTo().defaultContent();
但仍然有问题的IE

WebElement t = Driver.driver.findElement(By.id("iframe-user-text-input-div")); 
Driver.driver.switchTo().frame(t);
Driver.driver.findElement(By.xpath("/html/body/font")).click();
Driver.driver.findElement(By.xpath("/html/body")).sendKeys(randomtext);
Driver.driver.switchTo().defaultContent();