Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Web 应用程序,它具有非常复杂的框架/子框架/iframe 结构。这是动态生成和管理的。我正在为此编写一些硒测试,我必须验证是否存在元素。我可以用 xpath 来做到这一点(没问题),但我必须选择执行验证的帧/子帧。
如何识别此帧/子帧结构?
要与框架中的元素交互,您首先需要切换到框架。以下可以帮助您完成步骤 http://docs.seleniumhq.org/docs/03_webdriver.jsp#moving-between-windows-and-frames
一个旧线程: 如何切换到框架并使用 Web 驱动程序(Selenium - Java)单击弹出窗口?