-
-
Save angrygorilla/6e87f424022435ac3d08ad02e9a2cf3c to your computer and use it in GitHub Desktop.
Revisions
-
maxivak revised this gist
Dec 6, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -53,8 +53,8 @@ rm geckodriver-v0.11.1-linux64.tar.gz * copy to bin directory ``` sudo mv geckodriver /usr/bin sudo chmod +x /usr/bin/geckodriver ``` -
maxivak revised this gist
Dec 6, 2016 . 1 changed file with 24 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,10 +32,32 @@ Read: http://libre-software.net/how-to-install-firefox-on-ubuntu-linux-mint/ * https://support.mozilla.org/en-US/kb/install-older-version-of-firefox ### Install geckodriver * https://github.com/mozilla/geckodriver * download change URL to download - find here: https://github.com/mozilla/geckodriver/releases ``` cd /tmp wget https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz ``` * unzip ``` tar -xvzf geckodriver-v0.11.1-linux64.tar.gz rm geckodriver-v0.11.1-linux64.tar.gz ``` * copy to bin directory ``` mv geckodriver /usr/bin chmod +x /usr/bin/geckodriver ``` # Test with Selenium-webdriver -
maxivak revised this gist
Dec 6, 2016 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,6 +32,10 @@ Read: http://libre-software.net/how-to-install-firefox-on-ubuntu-linux-mint/ * https://support.mozilla.org/en-US/kb/install-older-version-of-firefox * geckodriver * https://github.com/mozilla/geckodriver # Test with Selenium-webdriver -
maxivak revised this gist
Dec 6, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,8 @@ gems: ## Selenium Install Selenium * https://pypi.python.org/pypi/selenium * https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver -
maxivak revised this gist
Dec 6, 2016 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,13 @@ gems: * gem 'selenium-webdriver', '3.0.3' ## Selenium * install Selenium * https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver ## Selenium and Firefox We will use selenium-webdriver version '3.0.3' which needs Firefox version 50.0.2. -
maxivak revised this gist
Dec 6, 2016 . 4 changed files with 17 additions and 49 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,23 @@ Read: http://libre-software.net/how-to-install-firefox-on-ubuntu-linux-mint/ # Test with Selenium-webdriver ``` require 'rubygems' require 'selenium-webdriver' driver = Selenium::WebDriver.for :firefox driver.manage.timeouts.implicit_wait = 10 # seconds driver.get "http://stackoverflow.com" puts "Page title is #{driver.title}" driver.quit ``` # Test with Capybara ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,26 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +0,0 @@ -
maxivak revised this gist
Dec 6, 2016 . 1 changed file with 62 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,16 +3,74 @@ ## Install gems: * gem 'capybara', '2.10.1' * gem 'selenium-webdriver', '3.0.3' ## Selenium and firefox We will use selenium-webdriver version '3.0.3' which needs Firefox version 50.0.2. !!! IMPORTANT!!! Check selenium gem version is compatible with Firefox version. * check compatibility: * https://github.com/SeleniumHQ/selenium/blob/master/java/CHANGELOG * https://github.com/santiycr/selenium-firefox-support-matrix * Install Firefox on Ubuntu Read: http://libre-software.net/how-to-install-firefox-on-ubuntu-linux-mint/ * if needed install the older version of Firefox: * https://support.mozilla.org/en-US/kb/install-older-version-of-firefox # Test with Capybara ``` require 'rubygems' require 'capybara' require 'capybara/dsl' Capybara.run_server = false Capybara.current_driver = :selenium Capybara.app_host = 'http://stackoverflow.com' #Capybara.server_port = 3000 module MyCapybaraTest class Test include Capybara::DSL def test visit('http://stackoverflow.com') puts "Page title is #{page.title}" end end end t = MyCapybaraTest::Test.new t.test ``` # Headless test ``` require 'selenium-webdriver' require 'headless' headless = Headless.new(display: 99) headless.start driver = Selenium::WebDriver.for :firefox driver.navigate.to 'http://stackoverflow.com' puts driver.title headless.destroy ``` -
maxivak revised this gist
Dec 5, 2016 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,3 +10,9 @@ gems: !!! IMPORTANT!!! Check selenium gem version is compatible with Firefox version. * check compatibility: * https://github.com/SeleniumHQ/selenium/blob/master/java/CHANGELOG * https://github.com/santiycr/selenium-firefox-support-matrix * if needed install the older version of Firefox: * https://support.mozilla.org/en-US/kb/install-older-version-of-firefox -
maxivak revised this gist
Dec 5, 2016 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,12 @@ # Selenium tests on Ruby ## Install gems: * gem 'capybara' * gem 'selenium-webdriver' ## Selenium and firefox !!! IMPORTANT!!! Check selenium gem version is compatible with Firefox version. -
maxivak revised this gist
Nov 9, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ # Selenium tests on Ruby -
maxivak renamed this gist
Oct 19, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
maxivak created this gist
Oct 19, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ require 'rubygems' require 'capybara' require 'capybara/dsl' Capybara.run_server = false Capybara.current_driver = :selenium Capybara.app_host = 'http://stackoverflow.com' #Capybara.server_port = 3000 module MyCapybaraTest class Test include Capybara::DSL def test visit('http://stackoverflow.com') puts "Page title is #{page.title}" end end end t = MyCapybaraTest::Test.new t.test This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ require 'selenium-webdriver' require 'headless' headless = Headless.new(display: 99) headless.start driver = Selenium::WebDriver.for :firefox driver.navigate.to 'http://stackoverflow.com' puts driver.title headless.destroy This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ require 'rubygems' require 'selenium-webdriver' driver = Selenium::WebDriver.for :firefox driver.manage.timeouts.implicit_wait = 10 # seconds driver.get "http://stackoverflow.com" puts "Page title is #{driver.title}" driver.quit