Ruby on Firefox browser

Source: Internet
Author: User
1) install the firewatir gem

Gem install firewatir

 
 
2) install the jssh Firefox extension

Firefox 3.6 on Windows:Http://wiki.openqa.org/download/attachments/13893658/jssh-3.6-WINNT.xpi? Version = 1 & modificationdate = 1264489925906

3) Ensure Firefox settings are correct

Certain Firefox settings need to be changed to ensure firewatir functions correctly. These instructions can be followed to get the Firefox # attach command to work.

    1. Make sure that pop ups are allowed in Firefox. You can allow all popups, or only for certain sites that you are testing. (option-> content)
    2. Make sure that Firefox opens a new window instead of a new tab when a link is clicked. (option-> tabs)

 

4) you will needOpen Firefox using a command line argumentTo get firewatir to recognize jssh. To do this, open your command prompt, or a terminal, and run:

Firefox.exe-jssh

 

5) firewatir example script

# Include the firewatir file. require 'firewatir' FF = firewatir: Firefox. new # Open Yahoo Mail. ff. goto ("http://mail.yahoo.com") # Put your user name. ff. text_field (: name, "login "). set ("user_name") # Put your password. ff. text_field (: name, "passwd "). set ("password") # click sign in button. ff. button (: value, "sign in "). click # click sign out button. ff. link (: text, "sign out "). click # Close the browser. ff. close

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.