硒运行中如何关闭弹出窗口? [英] How to close the pop up window in selenium running?

查看:81
本文介绍了硒运行中如何关闭弹出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想关闭弹出窗口(已知的窗口名称),然后返回到原始窗口. 我该怎么办? 如果我无法获得窗口中关闭按钮的常量.那么是否有一般行为可以达到目标?

I wanna close the pop up window (known window name), and back to the original window. What shall I do? If I can't get a constant of the close button in window. so is there any general behavior to reach the goal?

推荐答案

您是否尝试过:

selenium.Close();
selenium.SelectWindow("null");

这篇关于硒运行中如何关闭弹出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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