This repository has been archived by the owner on Aug 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebDriverHelper, wait behavior tests and other stuff introduced
added test for multiple fixtures support with selenium table. Attributes test merged into one test. Doc improved added run script. Send keys action enhanced to work with file upload remote driver (resolves #21 and resolves #22)
- Loading branch information
1 parent
02f808a
commit d2844b6
Showing
41 changed files
with
737 additions
and
588 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
- oraclejdk8 | ||
env: | ||
global: | ||
- secure: lk5sOGWmEGWHerSPY5QGjZPPTcNo3HokKpmiue7nAfgmwp2l/jvYQuvTCV639KcxegTzDfFR7nIheaw+tqHjudePnP4Py0yWEPduVZUI5Vbs6awyt8t7JcwTaWLQILTpSzjc4iXR6cTi/h+DUEjYRgxSbhPKk4IlBeRQ3FvTIAXoegZoTLjmBGR8b/Azs7DzU3fAntZnOK8PKRFj6U4ZsUJg6ESKLs0gPFMfgK7Q6STQ4T1qC1tlfCb2ToflILb2mcccwIGDtDSWQksnL4FS9EXTi0RaJ/DkWP1bctsvW9ACrvG0mjzZLSO0yQ5tua/Q0WgClU1C0bXikFOSPLBEP8Lec7Abhnd1P0xMEN/9lQ3JEj822eZayrqGpuxNPvGW5Mi6NESZyx4AJPNwwIAGwYibAV01bQj0dZLlvY8AcdbesYaQGf+opTaK0E6OoTxlzVverWDj/+O+OO4b0JvL+6GeP0ohhQkKhobW5Bh3gVbbLPX/VsIPoV66jAhFqLXA3h9OHILedorfh6UvkssOOzn/IuOJPKm0AhRnLSslNBTrvARDCOriz3wCs8DHF6IfCL9FILabkf3kqoVW8JbJ64PrPkGPxQoqxOF5jSDssjH7Fn6bCSX8yXluwt1cCUL42V8pLKng/1kHOOFSvVe57mcJM7jOQkdcZ5p9ediVYZ8= | ||
- M2_REPO: ~/.m2 | ||
- PARENT_POM_VERSION: 0.4.1 | ||
- M2_REPO: "~/.m2" | ||
- PARENT_POM_VERSION: 0.5.0 | ||
- secure: M6R3YjHqMzdayjhLH/7rtbEoh1HNab53DmDZ536Ii+84wG/Xe/qxFcos+BkfHJweEx+3AnC6hZW8zli/65pX4XPQ2CvVzk6RF2veYWNqOtnCj6M/WICY6thRz3C+HFb2/mCsPu3bBxRt62qUt4YlGHXhpFasPNQFu7/LAgrht3cUbhzNJ5Zv9AjjWVOqHA/31onvqYEDiySDxuN6N1ArB01pev3lRpqJtUl94hScoGNABTLo66Fp2MerGyo6m5PyGi0AcFLVTqxHPakI5pkQFiOJCMS/LkU7LctRHR64c5fCvn95x4Dr/4HEEC2FNY7Ztt6mf53BXjbSm06t9FxddsrrMd3QMRLqXHyha10BVb9Kt15/Wy7uxMtM0FnTtXaRYYPZC/3S5NV9FqvtjEv68+FVSkS0Rwmu1UrruG09dIsszIeYlJWQagbA5VDL31DS5DVahsBGi0bFTXlEh1jgTIT0YKXcsWwzUy7u6vlPDFrc0zJAa8DBnZ1L1RIhggc+SR0uTlb7q94F6WoI1Cr+Z2HQD3hmB9UpMgq7+IgjANklu+m83+XeDjmJJKY/SfrXOsgiwYfl8SOHBpkNTawlo6pniFCQatP+C5BFhkznPHBZjSzMU6NBYJmXUpHh1bwdUv22t4rJQCVvlgn4i/9ctcweZk5hU36w6O4DxxEpXIU= | ||
|
||
before_install: | ||
- openssl aes-256-cbc -K $encrypted_46b0bb06b333_key -iv $encrypted_46b0bb06b333_iv -in src/deploy/private.key.enc -out src/deploy/private.key -d | ||
- gpg --import src/deploy/private.key && gpg --import src/deploy/public.key | ||
- mvn dependency:get -Dartifact=com.github.andreptb:andreptb-component-parent:$PARENT_POM_VERSION:xml:mvn-settings | ||
- cp $M2_REPO/repository/com/github/andreptb/andreptb-component-parent/$PARENT_POM_VERSION/andreptb-component-parent-$PARENT_POM_VERSION-mvn-settings.xml $M2_REPO/settings.xml | ||
- openssl aes-256-cbc -K $encrypted_46b0bb06b333_key -iv $encrypted_46b0bb06b333_iv -in src/deploy/private.key.enc -out src/deploy/private.key -d | ||
- gpg --import src/deploy/private.key && gpg --import src/deploy/public.key | ||
- mvn dependency:get -Dartifact=com.github.andreptb:andreptb-component-parent:$PARENT_POM_VERSION:xml:mvn-settings | ||
- cp $M2_REPO/repository/com/github/andreptb/andreptb-component-parent/$PARENT_POM_VERSION/andreptb-component-parent-$PARENT_POM_VERSION-mvn-settings.xml $M2_REPO/settings.xml | ||
install: | ||
- mvn dependency:resolve dependency:resolve-plugins | ||
- mvn dependency:resolve dependency:resolve-plugins | ||
script: | ||
- mvn deploy site-deploy | ||
- mvn deploy site-deploy |
This file contains 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 characters
This file contains 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 characters
17 changes: 10 additions & 7 deletions
17
.../FitNesseSeleniumSlim/SeleniumFixtureTests/CommandsWithBrowserUnavailableTest/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
| selenium | | ||
| note | since the browser is not started, none of the commands below should work | | ||
| reject | open | http://google.com | | ||
| reject | open window | http://google.com | | ||
| reject | select window | http://google.com | | ||
| reject | open | http://www.roboform.com/filling-test-custom-fields | | ||
| reject | browser available | | ||
| reject | open window | http://www.roboform.com/filling-test-custom-fields | | ||
| reject | select window | http://www.roboform.com/filling-test-custom-fields | | ||
| check | current window | null | | ||
| check | title | null | | ||
| check | current url | null | | ||
| reject | close | | ||
| reject | close browser tab | | ||
| reject | type | some text | | ||
| reject | send keys | some text | | ||
| reject | click | | ||
| check | value | id=lst-ib | null | | ||
| check | text | id=lst-ib | null | | ||
| check | value | name=01___title | null | | ||
| check | text | name=01___title | null | | ||
| check | screenshot | null | | ||
| reject | present | id=lst-ib | | ||
| reject | present | name=01___title | | ||
| reject | select | index=1 | in | name=ttl_select | | ||
| check | selected | index | in | name=ttl_select | null | |
3 changes: 0 additions & 3 deletions
3
...sse/FitNesseRoot/FitNesseSeleniumSlim/SeleniumFixtureTests/InvalidBrowserTest/content.txt
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
...Root/FitNesseSeleniumSlim/SeleniumFixtureTests/ManualTests/InvalidBrowserTest/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
| selenium | | ||
| note | since test should throw an exception, must be tested manually | | ||
| start browser | invalid browser | | ||
| reject | browser available | |
File renamed without changes.
39 changes: 39 additions & 0 deletions
39
...NesseSeleniumSlim/SeleniumFixtureTests/ManualTests/WaitBehaviorInCommandsTest/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
!define WAIT_TIMEOUT {5} | ||
|
||
Since all actions should fail, this test must be ran manually. Besides each command should take at least ${WAIT_TIMEOUT} seconds to complete, not desirable for CI. | ||
|
||
The expected result of this test is the following: | ||
- ensure that each actions tries ${WAIT_TIMEOUT} seconds to complete before failing | ||
- ensure that check failures show the difference of expected and obtained values. | ||
- ensure that inputing elements throws the exception indicating the element to input was not found. | ||
|
||
| selenium | | ||
| start browser | ${BROWSER} | with | name='fitnesse-selenium-slim-tests' browserName='firefox' | | ||
| open | http://www.roboform.com/filling-test-custom-fields | | ||
| set wait timeout | ${WAIT_TIMEOUT} | | ||
| check | current window | invalidWindowId | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| check | title | invalidTitle | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| check | current url | http://invalidUrl | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| ensure | type | some text | in | name=invalidField | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| ensure | send keys | some text | in | name=invalidField | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| type | some text | in | name=field1 | | ||
| check not | value | name=field1 | some text | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| check | text | css=h1.mcs | invalid text | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| check | text | id=invalidField | whatever text | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| reject | present | name=01___title | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| ensure | select | index=1 | in | id=invalidField | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| check | selected | index | in | id=invalidField | 1 | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| check | selected | index | in | name=ttl_select | 10 | | ||
| check | last command duration | ${WAIT_TIMEOUT} | | ||
| quit browser | |
5 changes: 3 additions & 2 deletions
5
...essionTests/AttributeTests/properties.xml → ...WaitBehaviorInCommandsTest/properties.xml
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<properties> | ||
<AddChild/> | ||
<Edit/> | ||
<Files/> | ||
<Properties/> | ||
<Prune/> | ||
<Refactor/> | ||
<Search/> | ||
<Suite/> | ||
<Test/> | ||
<Versions/> | ||
<WhereUsed/> | ||
</properties> |
1 change: 1 addition & 0 deletions
1
fitnesse/FitNesseRoot/FitNesseSeleniumSlim/SeleniumFixtureTests/ManualTests/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!contents -R2 -g -p -f -h |
15 changes: 15 additions & 0 deletions
15
fitnesse/FitNesseRoot/FitNesseSeleniumSlim/SeleniumFixtureTests/ManualTests/properties.xml
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<properties> | ||
<Edit/> | ||
<Files/> | ||
<Help>Tests intended to be ran and analyzed manually for specific reasons</Help> | ||
<Properties/> | ||
<Prune/> | ||
<RecentChanges/> | ||
<Refactor/> | ||
<Search/> | ||
<Suite/> | ||
<Suites>manual</Suites> | ||
<Versions/> | ||
<WhereUsed/> | ||
</properties> |
6 changes: 6 additions & 0 deletions
6
...tNesseSeleniumSlim/SeleniumFixtureTests/SameBrowserSessionTests/AttributeTest/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
| selenium | | ||
| open | http://saucelabs.com | | ||
| check | attribute | class | in | id=signup | callout | | ||
| check | attribute | class | in | css=#signup | callout | | ||
| check | attribute | href | in | xpath=//li[@id='signinout']/a | !-https://saucelabs.com/login-! | | ||
| check | attribute | href | in | //li[@id='signinout']/a | !-https://saucelabs.com/login-! | |
File renamed without changes.
9 changes: 0 additions & 9 deletions
9
...sts/SameBrowserSessionTests/AttributeTests/IllegalUsesOfAttributeSelectorTest/content.txt
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...eniumFixtureTests/SameBrowserSessionTests/AttributeTests/WithAllSelectorsTest/content.txt
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...NesseSeleniumSlim/SeleniumFixtureTests/SameBrowserSessionTests/AttributeTests/content.txt
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...eleniumSlim/SeleniumFixtureTests/SameBrowserSessionTests/EnsureNotPresentTest/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
| selenium | | ||
| open | http://saucelabs.com/login | | ||
| ensure | not present | id=fieldNotOnThePage | | ||
| ensure | not present | id=username@attributeNotOnField | | ||
| note | should return false if id=username exists | | ||
| reject | not present | id=username | | ||
| note | should return false if id=username has class attribute | | ||
| reject | not present | id=username@class | |
5 changes: 0 additions & 5 deletions
5
...seSeleniumSlim/SeleniumFixtureTests/SameBrowserSessionTests/EnsurePresentTest/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
| selenium | | ||
| open | http://saucelabs.com/login | | ||
| ensure | present | id=username | | ||
| ensure | present | id=username@class | | ||
| note | should return false if id=fieldNotOnThePage dont exist | | ||
| reject | present | id=fieldNotOnThePage | | ||
| reject | present | id=fieldNotOnThePage@class | | ||
| note | should return false if id=username@attributeNotOnField dont exist | | ||
| reject | present | id=username@attributeNotOnField | |
14 changes: 14 additions & 0 deletions
14
...NesseSeleniumSlim/SeleniumFixtureTests/SameBrowserSessionTests/FileUploadTest/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Besides testing input file upload, this test also covers javascript running with "run script action". | ||
|
||
| scenario | set input file visibility | visibility | | ||
| run script | document.querySelector("span[flow-btn] input[type='file']").style.visibility = "@visibility"; | | ||
|
||
| selenium | | ||
| open | http://flowjs.github.io/ng-flow/ | | ||
| set input file visibility | visible | | ||
| ensure | type | fitnesse/plugins.properties | in | css=span[flow-btn] input[type='file'] | | ||
| set input file visibility | hidden | | ||
| run script | window.scrollTo(0,document.body.scrollHeight); | | ||
| check | text | css=div.transfer-box | =~/^plugins.properties.+/ | | ||
| check | attribute | aria-valuenow | in | css=div.transfer-box .progress-bar | 100 | | ||
| show | screenshot | |
File renamed without changes.
25 changes: 25 additions & 0 deletions
25
...eleniumSlim/SeleniumFixtureTests/SameBrowserSessionTests/MultipleFixturesTest/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Xebium tests disabled for ci, enable when running locally. | ||
|
||
|import| | ||
| note | com.xebia.incubator.xebium| | ||
|
||
|library| | ||
|jdbc fixture| | ||
|
||
|
||
| scenario | do jdbc stuff | | ||
| connect jdbc on | db | with url | jdbc:hsqldb:mem:testdb | and driver | org.hsqldb.jdbcDriver | and username | sa | and password | sa | | ||
| run in | db | the sql | CREATE TABLE USER (ID BIGINT IDENTITY, NAME VARCHAR(255) NOT NULL, PASSWORD VARCHAR(255) NOT NULL) | | ||
|
||
| scenario | do xebium stuff | | ||
| start browser | firefox | on url | http://www.google.com/ | | ||
| ensure | do | open | on | / | | ||
| ensure | do | type | on | id=lst-ib | with | Xebium | | ||
| ensure | do | click | on | name=btnG | | ||
| stop browser | | ||
|
||
| selenium | | ||
| open | http://www.roboform.com/filling-test-all-fields | | ||
| send keys | mytitle${KEY_TAB} | in | name=01___title | | ||
| do jdbc stuff | | ||
| note | do xebium stuff | |
13 changes: 13 additions & 0 deletions
13
...niumSlim/SeleniumFixtureTests/SameBrowserSessionTests/MultipleFixturesTest/properties.xml
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<properties> | ||
<Edit/> | ||
<Files/> | ||
<Help/> | ||
<Properties/> | ||
<Refactor/> | ||
<Search/> | ||
<Suites/> | ||
<Test/> | ||
<Versions/> | ||
<WhereUsed/> | ||
</properties> |
2 changes: 0 additions & 2 deletions
2
...serSessionTests/SendKeysTests/content.txt → ...wserSessionTests/SendKeysTest/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
| selenium | | ||
| open | http://www.roboform.com/filling-test-all-fields | | ||
| show | screenshot | | ||
| send keys | mytitle${KEY_TAB} | in | name=01___title | | ||
| check | value | name=01___title | mytitle | | ||
| send keys | myname | | ||
| check | value | name=02frstname | myname | | ||
| send keys | ${KEY_HOME}preppended | | ||
| check | value | name=02frstname | preppendedmyname | | ||
| show | screenshot | |
File renamed without changes.
4 changes: 3 additions & 1 deletion
4
.../FitNesseSeleniumSlim/SeleniumFixtureTests/SameBrowserSessionTests/SuiteSetUp/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
!define WAIT_TIMEOUT {5} | ||
|
||
| selenium | | ||
| start browser | ${BROWSER} | with | name='fitnesse-selenium-slim-tests' browserName='firefox' | | ||
| note | changes timeout configuration for 5 seconds (default is 20) | | ||
| set wait timeout | 5 | | ||
| set wait timeout | ${WAIT_TIMEOUT} | |
2 changes: 1 addition & 1 deletion
2
...tNesseSeleniumSlim/SeleniumFixtureTests/SameBrowserSessionTests/SuiteTearDown/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
| selenium | | ||
| quit | | ||
| quit browser | |
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
2 changes: 1 addition & 1 deletion
2
fitnesse/FitNesseRoot/FitNesseSeleniumSlim/SeleniumFixtureTests/content.txt
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
!define TEST_SYSTEM {slim} | ||
|
||
!***> classpath config | ||
!pomFile pom.xml@runtime | ||
!pomFile pom.xml@test | ||
***! | ||
|
||
!contents -R2 -g -p -f -h |
This file contains 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 characters
Oops, something went wrong.