无法定位元素,在 VS 2013 和 C# 上使用 webdriver

Unable to locate element, using webdriver on VS 2013 & C#

enter image description hereWebdriver 无法定位元素

webdriver 无法在我的网页上找到这个元素 id="frameworkContainer"(附上 html 的图像)。我使用了 xpath、cssslocator、类名和 ID。 我在带有 C# 的 VS2013 上使用 webdriver.. 有人可以对此有所了解。

您必须先切换到 iFrame,然后才能在其中找到任何元素。既然有ID,最好的方法就是通过它来查找元素。

driver.switchTo().frame(iFrameLocator);