Rubin Mechanize Link Pop-up / New Window

I am using ruby ​​with mechanical stone to try to clear the data from the website. my question is that after entering the link page, the website launches a new page on which the actual data is stored. How can I link to this new page in mechanization?

script:

require 'mechanize'

a = Mechanize.new
page = a.get('http://www.obfuscation.com')
formd = page.forms[0]

formd.txtUserName = 'username'
formd.txtPassword = 'password'
formd.submit

Here I programmatically lose the trajectory of a new browser popup.

Your help is greatly appreciated

+4
source share

Source: https://habr.com/ru/post/1610517/


All Articles