-
Open a browser
# start an instance of firefox with selenium-webdriver driver = Selenium::WebDriver.for :firefox # :chrome -> chrome # :ie -> iexplore
- Go to a specified URL
First install Virtualbox
sudo pico /etc/apt/sources.list.d/virtualbox.listdeb http://download.virtualbox.org/virtualbox/debian saucy contrib non-freewget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -sudo apt-get updatesudo apt-get install dkms unzipsudo apt-get install virtualbox-4.3 --no-install-recommendswget http://download.virtualbox.org/virtualbox/4.3.6/Oracle_VM_VirtualBox_Extension_Pack-4.3.6.vbox-extpacksudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.6.vbox-extpack| (function( $ ) { | |
| $.fn.simulateDragDrop = function(options) { | |
| return this.each(function() { | |
| new $.simulateDragDrop(this, options); | |
| }); | |
| }; | |
| $.simulateDragDrop = function(elem, options) { | |
| this.options = options; | |
| this.simulateEvent(elem, options); | |
| }; |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |