简体   繁体   English

无法在Selenium Webdriver中找到iframe

[英]Unable to locate iframe in Selenium Webdriver

I am using Selenium 2 WebDriver API and receiving Unable to locate element Error when I am running my Tests. 我正在使用Selenium 2 WebDriver API,并且在运行测试时收到无法定位元素错误。 The element is an iframe. 元素是iframe。 But wait , when I run the test locally (in my local server) it works fine (via driver.switchTo().frame("frame id");) approach, but when my tests run on live server, the error arrives. 但是,等等,当我在本地(在本地服务器上)运行测试时,它可以正常工作(通过driver.switchTo()。frame(“ frame id”);)方法,但是当我的测试在实时服务器上运行时,错误到来了。

The one difference between them is that the live server is running on https. 它们之间的一个区别是实时服务器在https上运行。 Is that the issue that WebDriver is not recognizing iframe over SSL ?? 这是WebDriver无法通过SSL识别iframe的问题吗?

Any Help is appreciated. 任何帮助表示赞赏。

使用driver.switchTo().frame(index);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM