Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f9daed5
Added execute_javascript_with_arguments keyword
arnewohletz Jun 26, 2018
aeb3dd5
Fix typo
aaltat Jun 22, 2018
47b0317
Remove Selenium 2.53.6 from Travis
aaltat Jun 30, 2018
658528a
Added execute_asyncrhonous_javascript_with_arguments keyword
arnewohletz Jul 1, 2018
2fe9d9c
added acceptance test execute_javascript_with_arguments keyword
arnewohletz Jul 2, 2018
7f62759
Fix typo
aaltat Jun 22, 2018
d4d24b3
Remove Selenium 2.53.6 from Travis
aaltat Jun 30, 2018
84e1c3b
try to resolve merge conflict in javascript.py
arnewohletz Jul 2, 2018
eb83fbe
added execute_async_javscript_with_arguments keyword
arnewohletz Jul 2, 2018
b6c8f3b
Update requirements.txt for minimum selenium version
aaltat Jul 4, 2018
58509b4
added support for ARGUMENTS and JAVASCRIPT markers in execute_javascr…
arnewohletz Jul 9, 2018
5d26fd5
FIX: javascript files can now be read with 'execute (async) javascrip…
arnewohletz Jul 11, 2018
d954449
Initial commit:
arnewohletz Jul 16, 2018
4b3f52a
removed tag
arnewohletz Jul 16, 2018
987c60a
added approved files (approvaltests)
arnewohletz Jul 16, 2018
477cad6
Create webdriver fix for Selenium 3.14.0
aaltat Aug 9, 2018
fb4802f
Content assertion fix for Selenium 3.14.0
aaltat Aug 9, 2018
71fc90c
Fixing cookies for selenium 3.14.0
aaltat Aug 9, 2018
516b0f1
Fixing counting elements for selenium 3.14.0
aaltat Aug 9, 2018
01bdc0a
Fixing screenshots for selenium 3.14.0
aaltat Aug 9, 2018
6d7a862
Open and close fix for Selenium 3.14.0
aaltat Aug 9, 2018
9bcef57
Update selenium to 3.14.0 in Travis
aaltat Aug 9, 2018
f431f5c
Add Python 3.4 to travis
aaltat Aug 10, 2018
ac39608
Fixing .travis.yaml
aaltat Aug 10, 2018
7ccc021
Remove Firefox from .travis.yaml
aaltat Aug 10, 2018
03a5c63
Approvaltests (#1173)
aaltat Aug 10, 2018
1e9a8b3
Added execute_javascript_with_arguments keyword
arnewohletz Jun 26, 2018
fdfa18b
Added execute_asyncrhonous_javascript_with_arguments keyword
arnewohletz Jul 1, 2018
56a3d84
added acceptance test execute_javascript_with_arguments keyword
arnewohletz Jul 2, 2018
a43b773
try to resolve merge conflict in javascript.py
arnewohletz Jul 2, 2018
6377b07
added execute_async_javscript_with_arguments keyword
arnewohletz Jul 2, 2018
eb176ff
added support for ARGUMENTS and JAVASCRIPT markers in execute_javascr…
arnewohletz Jul 9, 2018
5772038
FIX: javascript files can now be read with 'execute (async) javascrip…
arnewohletz Jul 11, 2018
4e43246
Initial commit:
arnewohletz Jul 16, 2018
88a7b97
removed tag
arnewohletz Jul 16, 2018
6372421
added approved files (approvaltests)
arnewohletz Jul 16, 2018
2360df5
Moved keyword logic into functions
arnewohletz Aug 17, 2018
bf7250e
Added WinMerge option to approvals_reporters.json
arnewohletz Aug 17, 2018
ea10340
Merge remote-tracking branch 'refs/remotes/origin/master'
arnewohletz Aug 17, 2018
6035d60
Fixed .travis.yml
arnewohletz Aug 17, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 24 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ env:
global:
- JYTHON=false
addons:
firefox: latest
apt:
sources:
- google-chrome
Expand All @@ -17,58 +16,55 @@ before_install:
- unzip chromedriver_linux64.zip
- sudo chmod u+x chromedriver
- sudo mv chromedriver /usr/bin/
# Firefox latest
# - FDVERSION=`curl -s -L https://github.com/mozilla/geckodriver/releases/latest | grep -E href=\"\(.*\)geckodriver-v\(.*\)-linux64.tar.gz\"`
# - VFILE=`echo $FDVERSION | sed -E "s/^.*<a href=\"/https:\/\/github.com/" -- | sed -E "s/\" rel=\"nofollow\">//" --`
# - wget --no-verbose $VFILE
# - tar xzf geckodriver*-linux64.tar.gz
# - sudo chmod u+x geckodriver
# - sudo mv geckodriver /usr/bin/
matrix:
include:
- python: "3.6"
env:
- BROWSER=headlesschrome
- SELENIUM=3.12.0
- SELENIUM=3.14.0
- ROBOTFRAMEWORK=3.0.4
- ROBOT_OPTIONS=--dotted
- INTERPRETER=python3
- python: "pypy3.5"
env:
- BROWSER=chrome
- SELENIUM=3.12.0
- SELENIUM=3.14.0
- ROBOTFRAMEWORK=3.0.4
- ROBOT_OPTIONS=--dotted
- INTERPRETER=pypy3
- python: "3.6"
- python: "3.4"
env:
- BROWSER=headlesschrome
- SELENIUM=3.12.0
- SELENIUM=3.14.0
- ROBOTFRAMEWORK=3.0.4
- ROBOT_OPTIONS=--dotted
- INTERPRETER=python3
- JYTHON=true
- python: "3.4"
env:
- BROWSER=headlesschrome
- SELENIUM=3.14.0
- ROBOTFRAMEWORK=3.0.4
- ROBOT_OPTIONS=--dotted
- INTERPRETER=python3
- python: "2.7"
env:
- BROWSER=chrome
- SELENIUM=2.53.6
<<<<<<< HEAD
- SELENIUM=3.14.0
=======
- SELENIUM=3.12.0
>>>>>>> origin/master
- ROBOTFRAMEWORK=2.9.2
- ROBOT_OPTIONS=--dotted
- INTERPRETER=python2
- python: "2.7"
env:
- BROWSER=chrome
- SELENIUM=3.12.0
- SELENIUM=3.14.0
- ROBOTFRAMEWORK=2.8.7
- ROBOT_OPTIONS=
- INTERPRETER=python2
- python: "3.4"
env:
- BROWSER=chrome
- SELENIUM=2.53.6
- ROBOTFRAMEWORK=3.0.4
- ROBOT_OPTIONS=--dotted
- INTERPRETER=python3
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
Expand All @@ -82,7 +78,13 @@ before_script:
- echo $INTERPRETER
- $INTERPRETER --version
- $INTERPRETER -m pip install .
- $INTERPRETER -m pip install -r requirements-dev.txt
- if [ "$JYTHON" == "true" ]; then
$INTERPRETER -m pip install mockito;
$INTERPRETER -m pip install robotstatuschecker;
$INTERPRETER -m pip install -r requirements.txt;
else
$INTERPRETER -m pip install -r requirements-dev.txt;
fi
- $INTERPRETER -m pip install selenium==$SELENIUM
- $INTERPRETER -m pip install robotframework==$ROBOTFRAMEWORK
script:
Expand Down
2 changes: 1 addition & 1 deletion atest/acceptance/create_webdriver.robot
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Library Collections
Create Webdriver Creates Functioning WebDriver
[Documentation]
... LOG 2:1 INFO REGEXP: Creating an instance of the \\w+ WebDriver.
... LOG 2:4 DEBUG REGEXP: Created \\w+ WebDriver instance with session id (\\w|-)+.
... LOG 2:6 DEBUG REGEXP: Created \\w+ WebDriver instance with session id (\\w|-)+.
[Tags] Known Issue Internet Explorer Known Issue Safari
[Setup] Set Driver Variables
Create Webdriver ${DRIVER_NAME} kwargs=${KWARGS}
Expand Down
26 changes: 13 additions & 13 deletions atest/acceptance/keywords/content_assertions.robot
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Resource ../resource.robot

*** Test Cases ***
Location Should Be
[Documentation] LOG 2:3 Current location is '${FRONT PAGE}'.
[Documentation] LOG 2:4 Current location is '${FRONT PAGE}'.
Location Should Be ${FRONT PAGE}
Location Should Be ${FRONT PAGE} message=taco
Location Should Be ${FRONT PAGE} message=None
Expand All @@ -22,7 +22,7 @@ Location Should Be


Location Should Contain
[Documentation] LOG 2:3 Current location contains 'html'.
[Documentation] LOG 2:4 Current location contains 'html'.
Location Should Contain html
Location Should Contain html message=foobar
Location Should Contain html message=None
Expand All @@ -38,7 +38,7 @@ Location Should Contain


Title Should Be
[Documentation] LOG 2:3 Page title is '(root)/index.html'.
[Documentation] LOG 2:4 Page title is '(root)/index.html'.
Title Should Be (root)/index.html
Run Keyword And Expect Error
... Title should have been 'not a title' but was '(root)/index.html'.
Expand All @@ -49,8 +49,8 @@ Title Should Be


Page Should Contain
[Documentation] LOG 2:5 Current page contains text 'needle'.
... LOG 4.1:10 REGEXP: (?i)<html.*</html>
[Documentation] LOG 2:7 Current page contains text 'needle'.
... LOG 4.1:14 REGEXP: (?i)<html.*</html>
Page Should Contain needle
Page Should Contain This is the haystack
Run Keyword And Expect Error
Expand All @@ -63,7 +63,7 @@ Page Should Contain with text having internal elements
Page Should Contain Relative with text after

Page Should Contain With Custom Log Level
[Documentation] LOG 2.1:10 DEBUG REGEXP: (?i)<html.*</html>
[Documentation] LOG 2.1:14 DEBUG REGEXP: (?i)<html.*</html>
Run Keyword And Expect Error
... Page should have contained text 'non existing text' but did not.
... Page Should Contain non existing text DEBUG
Expand All @@ -81,15 +81,15 @@ Page Should Contain With Frames
Page Should Contain You're looking at right.

Page Should Not Contain
[Documentation] LOG 2:8 Current page does not contain text 'non existing text'.
... LOG 3.1:7 REGEXP: (?i)<html.*</html>
[Documentation] LOG 2:11 Current page does not contain text 'non existing text'.
... LOG 3.1:10 REGEXP: (?i)<html.*</html>
Page Should Not Contain non existing text
Run Keyword And Expect Error
... Page should not have contained text 'needle'.
... Page Should Not Contain needle

Page Should Not Contain With Custom Log Level
[Documentation] LOG 2.1:7 DEBUG REGEXP: (?i)<html.*</html>
[Documentation] LOG 2.1:10 DEBUG REGEXP: (?i)<html.*</html>
Run Keyword And Expect Error
... Page should not have contained text 'needle'.
... Page Should Not Contain needle DEBUG
Expand Down Expand Up @@ -199,7 +199,7 @@ Get Text
... Get Text missing_id

Page Should Contain Checkbox
[Documentation] LOG 2:5 Current page contains checkbox 'can_send_email'.
[Documentation] LOG 2:7 Current page contains checkbox 'can_send_email'.
[Setup] Go To Page "forms/prefilled_email_form.html"
Page Should Contain Checkbox can_send_email
Page Should Contain Checkbox xpath=//input[@type='checkbox' and @name='can_send_sms']
Expand All @@ -208,7 +208,7 @@ Page Should Contain Checkbox
... Page Should Contain Checkbox non-existing

Page Should Not Contain Checkbox
[Documentation] LOG 2:5 Current page does not contain checkbox 'non-existing'.
[Documentation] LOG 2:7 Current page does not contain checkbox 'non-existing'.
[Setup] Go To Page "forms/prefilled_email_form.html"
Page Should Not Contain Checkbox non-existing
Run Keyword And Expect Error
Expand Down Expand Up @@ -298,7 +298,7 @@ Page Should Not Contain Text Field
... Page Should Not Contain Text Field website

TextField Should Contain
[Documentation] LOG 2:7 Text field 'name' contains text ''.
[Documentation] LOG 2:10 Text field 'name' contains text ''.
[Setup] Go To Page "forms/email_form.html"
TextField Should contain name ${EMPTY}
TextField Should contain website ${EMPTY}
Expand All @@ -314,7 +314,7 @@ TextField Should Contain
... TextField Should contain website https://w3.org

TextField Value Should Be
[Documentation] LOG 2:7 Content of text field 'name' is ''.
[Documentation] LOG 2:10 Content of text field 'name' is ''.
[Setup] Go To Page "forms/email_form.html"
textfield Value Should Be name ${EMPTY}
Input Text name my name
Expand Down
2 changes: 1 addition & 1 deletion atest/acceptance/keywords/cookies.robot
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Test Get Cookie Object Value

Test Get Cookie Keyword Logging
[Documentation]
... LOG 2:3 ${cookie} = name=another
... LOG 2:4 ${cookie} = name=another
... value=value
... path=/
... domain=localhost
Expand Down
8 changes: 4 additions & 4 deletions atest/acceptance/keywords/counting_elements.robot
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ Page Should Contain Element When Limit Is None
Page Should Contain Element name: div_name limit=${None}

Page Should Contain Element When Limit Is Number
[Documentation] LOG 2:3 INFO Current page contains 2 element(s).
[Documentation] LOG 2:4 INFO Current page contains 2 element(s).
[Setup] Go To Page "links.html"
Page Should Contain Element name: div_name limit=2

Page Should Contain Element Log Level Does Not Affect When Keyword Passes
[Documentation] LOG 2:3 INFO Current page contains 2 element(s).
[Documentation] LOG 2:4 INFO Current page contains 2 element(s).
[Setup] Go To Page "links.html"
Page Should Contain Element name: div_name loglevel=debug limit=2

Expand All @@ -101,8 +101,8 @@ Page Should Contain Element When Limit Is Not Number

Page Should Contain Element When Error With Limit And Different Loglevels
[Documentation]
... LOG 2.1:5 INFO REGEXP: .*links\\.html.*
... LOG 3.1:5 DEBUG REGEXP: .*links\\.html.*
... LOG 2.1:7 INFO REGEXP: .*links\\.html.*
... LOG 3.1:7 DEBUG REGEXP: .*links\\.html.*
[Setup] Go To Page "links.html"
Run Keyword And Ignore Error
... Page Should Contain Element name: div_name limit=99
Expand Down
94 changes: 92 additions & 2 deletions atest/acceptance/keywords/javascript.robot
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Test Setup Go To Page "javascript/dynamic_content.html"
Resource ../resource.robot

*** Variables ***
${TEXT}= You scrolled in div.

*** Test Cases ***
Clicking Elements Should Activate Javascript
Title Should Be Original
Expand All @@ -22,14 +25,14 @@ Mouse Down On Link
Execute Javascript
[Documentation] LOG 2 Executing JavaScript:
... window.add_content('button_target', 'Inserted directly')
Execute Javascript window.add_content('button_target', 'Inserted directly')
Execute Javascript with arguments window.add_content('button_target', 'Inserted directly')
Page Should Contain Inserted directly

Execute Javascript from File
[Documentation] LOG 2:1 REGEXP: Reading JavaScript from file .*
... LOG 2:2 Executing JavaScript:
... window.add_content('button_target', 'Inserted via file')
Execute Javascript ${CURDIR}/executed_by_execute_javascript.js
Execute Javascript with arguments ${CURDIR}/executed_by_execute_javascript.js
Page Should Contain Inserted via file

Open Context Menu
Expand All @@ -52,3 +55,90 @@ Drag and Drop by Offset
Element Text Should Be id=droppable Drop here
Drag and Drop by Offset id=draggable ${100} ${20}
Element Text Should Be id=droppable Dropped!

Execute single line JavaScript with arguments
[Documentation] Scroll to element by executing javascript with target web
... element as argument
[Setup] Go To Page "scroll/index.html"
${initial_position}= Get Vertical Position css:#target
${element}= Get WebElement css:#target
${unused}= Set Variable ununsed
set test variable ${script} return arguments[0].scrollIntoView();
Execute Javascript with arguments ARGUMENTS ${element} ${unused} JAVASCRIPT ${script}
${position}= Get Vertical Position css:#target
Should Be True ${initial_position} > ${position}
Element Should Contain css:#result ${TEXT}

Execute multiline JavaScript with arguments first
${integer_variable}= Set Variable 123
Execute Javascript with arguments
... ARGUMENTS
... ${integer_variable}
... JAVASCRIPT
... console.log('Hello, world!');
... console.log(arguments[0]);

Execute multiline JavaScript with arguments last
${integer_variable}= Set Variable 123
Execute Javascript with arguments
... JAVASCRIPT
... console.log('Hello, world!');
... console.log(arguments[0]);
... ARGUMENTS
... ${integer_variable}

Execute multiline JavaScript with multiple arguments
[Setup] Go To Page "tables/tables.html"
${number_variable}= Set Variable 123
${string_variable}= Set Variable string
${boolean_variable}= Set Variable True
${null_variable}= Set Variable Null
${webelement_variable}= Get WebElement xpath://*[@id="mergedRows"]
Execute Javascript with arguments
... JAVASCRIPT
... if (arguments[2]) {
... console.log(arguments[3]);
... } else {
... console.log('This should not happen');
... }
... console.log(arguments[0]);
... return arguments[4].scrollIntoView();
... console.log(arguments[1].localname);
... ARGUMENTS
... ${number_variable}
... ${string_variable}
... ${boolean_variable}
... ${null_variable}
... ${webelement_variable}

Execute multiline JavaScript
Execute Javascript with arguments
... console.log('Hello, world!');
... console.log('Here I am.');
... console.log('Who else is here?');

Execute multiline JavaScript with marker
Execute Javascript with arguments
... JAVASCRIPT
... console.log('Hello, world!');
... console.log('Here I am.');
... console.log('Who else is here?');


Execute multiline Javascript without marker with multiple arguments
[Setup] Go To Page "tables/tables.html"
${number_variable}= Set Variable 123
${string_variable}= Set Variable string
${boolean_variable}= Set Variable True
${null_variable}= Set Variable Null
${webelement_variable}= Get WebElement xpath://*[@id="mergedRows"]
Execute Javascript with arguments
... console.log('Hello, world!');
... console.log('Here I am.');
... console.log('Who else is here?');
... ARGUMENTS
... ${number_variable}
... ${string_variable}
... ${boolean_variable}
... ${null_variable}
... ${webelement_variable}
4 changes: 2 additions & 2 deletions atest/acceptance/keywords/screenshots.robot
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Force Tags Known Issue Internet Explorer
*** Test Cases ***
Capture page screenshot to default location
[Documentation]
... LOG 2:3 </td></tr><tr><td colspan="3"><a href="selenium-screenshot-1.png"><img src="selenium-screenshot-1.png" width="800px"></a>
... LOG 8:3 </td></tr><tr><td colspan="3"><a href="selenium-screenshot-2.png"><img src="selenium-screenshot-2.png" width="800px"></a>
... LOG 2:4 </td></tr><tr><td colspan="3"><a href="selenium-screenshot-1.png"><img src="selenium-screenshot-1.png" width="800px"></a>
... LOG 8:4 </td></tr><tr><td colspan="3"><a href="selenium-screenshot-2.png"><img src="selenium-screenshot-2.png" width="800px"></a>
[Setup] Remove Files ${OUTPUTDIR}/selenium-screenshot-*.png
${file} = Capture Page Screenshot
${count} = Count Files In Directory ${OUTPUTDIR} selenium-screenshot-*.png
Expand Down
8 changes: 4 additions & 4 deletions atest/acceptance/open_and_close.robot
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Close Browser Does Nothing When No Browser Is Opened

Browser Open With Not Well-Formed URL Should Close
[Documentation] Verify after incomplete 'Open Browser' browser closes
... LOG 1.1:10 DEBUG STARTS: Opened browser with session id
... LOG 1.1:10 DEBUG REGEXP: .*but failed to open url.*
... LOG 1.1:15 DEBUG STARTS: Opened browser with session id
... LOG 1.1:15 DEBUG REGEXP: .*but failed to open url.*
... LOG 2:2 DEBUG STARTS: DELETE
... LOG 2:3 DEBUG STARTS: Finished Request
... LOG 2:4 DEBUG STARTS: Finished Request
Run Keyword And Expect Error * Open Browser bad.url.bad ${BROWSER}
Close All Browsers

Expand Down Expand Up @@ -58,7 +58,7 @@ Closing all browsers clears cache
Run Keyword And Expect Error
... No browser with index or alias 'Browser 2' found.
... Switch Browser Browser 2

Get Session Id
Open Browser ${ROOT}/forms/prefilled_email_form.html ${BROWSER} Browser 1
... remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
Expand Down
Loading