简体   繁体   English

控制和自动化子浏览器窗口

[英]Controlling and automating a child browser window

Suppose I access some applications through a VPN. 假设我通过VPN访问某些应用程序。 Let's say a webbrowser like internet explorer is one of these applications. 假设像Internet Explorer这样的Web浏览器就是这些应用程序之一。 Using python's selenium package I can automate logging in to VPN and opening the internet application inside the VPN. 使用python的selenium程序包,我可以自动登录VPN并在VPN内部打开Internet应用程序。 Now the internet explorer window inside VPN opens. 现在将打开VPN内的Internet Explorer窗口。

So what I need to know is: 所以我需要知道的是:

  1. Is there any way by which I can control this new internet explorer through python' selenium package? 有什么方法可以通过python的selenium软件包控制这个新的Internet Explorer?

  2. Is there any way to automate this child window using any other scripting language like Perl, tcl, vbscript etc? 有什么方法可以使用其他脚本语言(例如Perl,tcl,vbscript等)来自动化此子窗口?

Yes. 是。 Selenium provides methods to control the behavior of a separate child window that is spawned by another browser window. Selenium提供了一些方法来控制另一个浏览器窗口生成的单独子窗口的行为。 There are methods which allow you to jump into that window, perform some actions and then come back to the parent window that triggered the child window. 有一些方法可以让您跳入该窗口,执行一些操作,然后返回到触发子窗口的父窗口。

Is there any way to automate this child window using any other scripting language like Perl ,tcl,vbscript etc ? 有没有办法使用其他脚本语言(如Perl,tcl,vbscript等)来自动化此子窗口?

As mentioned above, Selenium with Python should be good enough to automate the process in child window. 如上所述,带有Python的Selenium应该足以在子窗口中自动执行该过程。

Adding a couple of links that may help you with this 添加几个链接可能会帮助您

  1. How to handle multiple windows Python Selenium 如何处理多个Windows Python Selenium
  2. Handling multiple windows 处理多个窗口
  3. Link 3 连结3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM