如何使用 selenium webdriver 处理 ModalDialog? [英] How to deal with ModalDialog using selenium webdriver?
本文介绍了如何使用 selenium webdriver 处理 ModalDialog?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法切换到给定示例的模态对话框
I am unable to switch to Modal Dialog of given example
http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/showModalDialog2.htm
我不知道如何在模态对话框中获取元素
I don't know how to get element on modal Dialog
推荐答案
使用
以下方法切换到modelframe
following methods to switch to modelframe
driver.switchTo().frame("ModelFrameTitle");
或
driver.switchTo().activeElement()
希望这会奏效
这篇关于如何使用 selenium webdriver 处理 ModalDialog?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文