views:

458

answers:

1

Please help me. This what I have written require "watir"

site_url = "http://vkontakte.ru"

ie = Watir::IE.new

ie.goto site_url

ie.text_field(:name, "email").set "[email protected]" ie.text_field(:name, "pass").set "zothrf"

I need to login on vkontakte.ru. I don't know how to do that with Javascript. Here the code from the main page from vkontakte.ru

Вход

+1  A: 

This logged me in:

require "watir"
site_url = "http://vkontakte.ru"
ie = Watir::IE.new
ie.goto site_url
ie.text_field(:name, "email").set "[email protected]"
ie.text_field(:name, "pass").set "zothrf"
ie.link(:href, /quick_login/).click
Željko Filipin