如何使用Selenium Webdriver处理ModalDialog? [英] How to deal with ModalDialog using selenium webdriver?

查看:124
本文介绍了如何使用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

推荐答案

使用

以下切换到模型框架的方法

following methods to switch to modelframe

driver.switchTo().frame("ModelFrameTitle");

driver.switchTo().activeElement()

希望这会起作用

这篇关于如何使用Selenium Webdriver处理ModalDialog?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆