diff --git a/.gitignore b/.gitignore index 56284b44b..6f7b23439 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ test/results *.pyc *.orig MANIFEST -doc/*.html *.egg-info *.egg chromedriver.log diff --git a/CHANGES.rst b/CHANGES.rst index e5fa6931d..c5c62f247 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,22 @@ Release Notes ============= +1.7.4 +------------------- +- Reverted 'Press Keys' because of backwards incompatible changes [zephraph] + +1.7.3 +------------------- +- Added 'Get WebElement' [zephraph][emanlove] + +- Added named keys to 'Press Key' [helioguilherme66] + +- Fix an import error that caused a dependence on RF >= 2.8.5 + [zephraph] + +- Fixed an issue that caused screenshots to be improperly linked in the logs + [zephraph] + 1.7.2 ---------------- - Added an argument called screenshot_root_directory that can be passed into S2L's diff --git a/README.rst b/README.rst index 52ce57f19..1a2cf50df 100644 --- a/README.rst +++ b/README.rst @@ -12,6 +12,9 @@ Selenium 2 (WebDriver) library for Robot Framework .. image:: https://img.shields.io/pypi/l/robotframework-selenium2library.svg :target: http://www.apache.org/licenses/LICENSE-2.0 + +.. image:: https://coveralls.io/repos/rtomac/robotframework-selenium2library/badge.svg?branch=master&service=github + :target: https://coveralls.io/github/rtomac/robotframework-selenium2library?branch=master .. image:: https://robotframework-slack.herokuapp.com/badge.svg :target: https://robotframework-slack.herokuapp.com diff --git a/doc/Selenium2Library.html b/doc/Selenium2Library.html new file mode 100644 index 000000000..c0c9a79fc --- /dev/null +++ b/doc/Selenium2Library.html @@ -0,0 +1,832 @@ + + +
+ + + + + + + + + + + + + + + +
- [Setup] Remove Files ${OUTPUTDIR}/selenium-screenshot-*.png
- Capture Page Screenshot
- ${count} = Count Files In Directory ${OUTPUTDIR} selenium-screenshot-*.png
- Should Be Equal As Integers ${count} 1
- Click Link Relative
- Wait Until Page Contains Element tag=body
- Capture Page Screenshot
- ${count} = Count Files In Directory ${OUTPUTDIR} selenium-screenshot-*.png
- Should Be Equal As Integers ${count} 2
+ [Documentation] LOG 2:3 REGEXP:
+ [Setup] Remove Files ${OUTPUTDIR}/selenium-screenshot-*.png
+ Capture Page Screenshot
+ ${count} = Count Files In Directory ${OUTPUTDIR} selenium-screenshot-*.png
+ Should Be Equal As Integers ${count} 1
+ Click Link Relative
+ Wait Until Page Contains Element tag=body
+ Capture Page Screenshot
+ ${count} = Count Files In Directory ${OUTPUTDIR} selenium-screenshot-*.png
+ Should Be Equal As Integers ${count} 2
Capture page screenshot to custom file
- [Setup] Remove Files ${OUTPUTDIR}/custom-screenshot.png
- Capture Page Screenshot custom-screenshot.png
- File Should Exist ${OUTPUTDIR}/custom-screenshot.png
+ [Documentation] Capture page screenshot to custom file
+ [Setup] Remove Files ${OUTPUTDIR}/custom-screenshot.png
+ Capture Page Screenshot custom-screenshot.png
+ File Should Exist ${OUTPUTDIR}/custom-screenshot.png
Capture page screenshot to custom directory
- [Setup] Remove Files ${TEMPDIR}/seleniumlibrary-screenshot-test.png
- Capture Page Screenshot ${TEMPDIR}/seleniumlibrary-screenshot-test.png
- File Should Exist ${TEMPDIR}/seleniumlibrary-screenshot-test.png
+ [Documentation] Capture page screenshot to custom directory
+ [Setup] Remove Files ${TEMPDIR}/seleniumlibrary-screenshot-test.png
+ Capture Page Screenshot ${TEMPDIR}/seleniumlibrary-screenshot-test.png
+ File Should Exist ${TEMPDIR}/seleniumlibrary-screenshot-test.png
Capture page screenshot to non-existing directory
- [Setup] Remove Directory ${OUTPUTDIR}/screenshot recursive
- Capture Page Screenshot screenshot/test-screenshot.png
- File Should Exist ${OUTPUTDIR}/screenshot/test-screenshot.png
+ [Documentation] Capture page screenshot to non-existing directory
+ [Setup] Remove Directory ${OUTPUTDIR}/screenshot recursive
+ Capture Page Screenshot screenshot/test-screenshot.png
+ File Should Exist ${OUTPUTDIR}/screenshot/test-screenshot.png
Capture page screenshot to custom root directory
- [Setup] Remove Directory ${OUTPUTDIR}/custom-root recursive
- Set Screenshot Directory ${OUTPUTDIR}/custom-root
- Capture Page Screenshot custom-root-screenshot.png
- File Should Exist ${OUTPUTDIR}/custom-root/custom-root-screenshot.png
+ [Documentation] Capture page screenshot to custom root directory
+ [Setup] Remove Directory ${OUTPUTDIR}/custom-root recursive
+ Set Screenshot Directory ${OUTPUTDIR}/custom-root
+ Capture Page Screenshot custom-root-screenshot.png
+ File Should Exist ${OUTPUTDIR}/custom-root/custom-root-screenshot.png
Ensure screenshot captures revert to default root directory
- [Setup] Remove Files ${OUTPUTDIR}/default-root-screenshot.png
- Capture Page Screenshot default-root-screenshot.png
- File Should Exist ${OUTPUTDIR}/default-root-screenshot.png
+ [Documentation] Ensure screenshot captures revert to default root directory
+ [Setup] Remove Files ${OUTPUTDIR}/default-root-screenshot.png
+ Capture Page Screenshot default-root-screenshot.png
+ File Should Exist ${OUTPUTDIR}/default-root-screenshot.png
+
+Capture page screenshot to with overwrite false and custom name
+ [Setup] Remove Directory ${OUTPUTDIR}/screenshot-overwrite recursive
+ Capture Page Screenshot screenshot-overwrite/some-name.png
+ File Should Exist ${OUTPUTDIR}/screenshot-overwrite/some-name.png
+ Capture Page Screenshot screenshot-overwrite/some-name.png
+ File Should Exist ${OUTPUTDIR}/screenshot-overwrite/some-name-1.png
+
+Capture page screenshot to with overwrite true
+ Capture Page Screenshot overwrite=True
+ Capture Page Screenshot overwrite=True
+ File Should Exist ${OUTPUTDIR}/selenium-screenshot-3.png
+ File Should Exist ${OUTPUTDIR}/selenium-screenshot-4.png
+ Capture Page Screenshot overwrite-filename.png overwrite=True
+ Capture Page Screenshot overwrite-filename.png overwrite=True
+ File Should Exist ${OUTPUTDIR}/overwrite-filename.png
+ File Should Not Exist ${OUTPUTDIR}/overwrite-filename-1.png
+
+Capture page screenshot with complex names
+ Capture Page Screenshot many.png.and.dots.png
+ Capture Page Screenshot many.png.and.dots.png
+ File Should Exist ${OUTPUTDIR}/many.png.and.dots.png
+ File Should Exist ${OUTPUTDIR}/many.png.and.dots-1.png
+ Capture Page Screenshot no-png-in-end
+ Capture Page Screenshot no-png-in-end
+ File Should Exist ${OUTPUTDIR}/no-png-in-end
+ File Should Exist ${OUTPUTDIR}/no-png-in-end-1
diff --git a/test/acceptance/keywords/tables/col_should_contain.robot b/test/acceptance/keywords/tables/col_should_contain.robot
index d1641bc8b..7b7eb676a 100644
--- a/test/acceptance/keywords/tables/col_should_contain.robot
+++ b/test/acceptance/keywords/tables/col_should_contain.robot
@@ -1,24 +1,33 @@
*** Settings ***
-Resource table_resource.robot
+Documentation Tests columns content
+Resource table_resource.robot
*** Test Cases ***
Should Find Text In Specific Column
- [Template] Table Column Should Contain With CSS And XPath Locators
- simpleTable 2 simpleTable_B2
- simpleWithNested 2 nestedTable_A1
- nestedTable 3 nestedTable_C1
- tableWithSingleHeader 1 tableWithSingleHeader_A1
- tableWithSingleHeader 1 tableWithSingleHeader_A3
- tableWithTwoHeaders 2 tableWithTwoHeaders_B2
+ [Documentation] Should Find Text In Specific Column
+ [Template] Table Column Should Contain With CSS And XPath Locators
+ simpleTable 2 simpleTable_B2
+ simpleWithNested 2 nestedTable_A1
+ nestedTable 3 nestedTable_C1
+ tableWithSingleHeader 1 tableWithSingleHeader_A1
+ tableWithSingleHeader 1 tableWithSingleHeader_A3
+ tableWithTwoHeaders 2 tableWithTwoHeaders_B2
Should Give Error Message When Content Not Found In Table Column
- Run Keyword And Expect Error Column #2 in table identified by 'simpleTable' should have contained text 'simpleTable_C3'. Table Column Should Contain simpleTable 2 simpleTable_C3
+ [Documentation] Should Give Error Message When Content Not Found In Table Column
+ Run Keyword And Expect Error
+ ... Column #2 in table identified by 'simpleTable' should have contained text 'simpleTable_C3'.
+ ... Table Column Should Contain simpleTable 2 simpleTable_C3
Should Give Error Message When Column Number Out Of Bounds
- Run Keyword And Expect Error Column #20 in table identified by 'simpleTable' should have contained text 'simpleTable_B3'. Table Column Should Contain simpleTable 20 simpleTable_B3
+ [Documentation] Should Give Error Message When Column Number Out Of Bounds
+ Run Keyword And Expect Error
+ ... Column #20 in table identified by 'simpleTable' should have contained text 'simpleTable_B3'.
+ ... Table Column Should Contain simpleTable 20 simpleTable_B3
*** Keywords ***
Table Column Should Contain With CSS And XPath Locators
- [Arguments] ${table id} ${col} ${expected}
- Run Table Keyword With CSS And XPath Locators Table Column Should Contain ${table id} ${col} ${expected}
-
+ [Documentation] Table Column Should Contain With CSS And XPath Locators
+ [Arguments] ${table id} ${col} ${expected}
+ Run Table Keyword With CSS And XPath Locators
+ ... Table Column Should Contain ${table id} ${col} ${expected}
diff --git a/test/acceptance/keywords/tables/finding_tables.robot b/test/acceptance/keywords/tables/finding_tables.robot
index 7d6e8b878..5b9888758 100644
--- a/test/acceptance/keywords/tables/finding_tables.robot
+++ b/test/acceptance/keywords/tables/finding_tables.robot
@@ -1,8 +1,10 @@
*** Settings ***
+Documentation Tests finding
Resource table_resource.robot
*** Test Cases ***
Should Identify Table By CSS
+ [Documentation] Should Identify Table By CSS
Table Should Contain css=table#simpleTable simpleTable
Table Header Should Contain css=table#tableWithTwoHeaders tableWithTwoHeaders_C2
Table Footer Should Contain css=table#withHeadAndFoot withHeadAndFoot_AF1
diff --git a/test/acceptance/keywords/tables/footer_should_contain.robot b/test/acceptance/keywords/tables/footer_should_contain.robot
index 1c235ada1..3d4f0bac2 100644
--- a/test/acceptance/keywords/tables/footer_should_contain.robot
+++ b/test/acceptance/keywords/tables/footer_should_contain.robot
@@ -1,19 +1,25 @@
*** Settings ***
-Resource table_resource.robot
+Documentation Tests footer
+Resource table_resource.robot
*** Test Cases ***
Should Find Text In Footer
- [Template] Table Footer Should Contain With CSS And XPath Locators
- withHeadAndFoot withHeadAndFoot_AF1
- withHeadAndFoot withHeadAndFoot_CF1
- withHeadAndFoot withHeadAndFoot_AF2
- withHeadAndFoot withHeadAndFoot_CF2
+ [Documentation] Should Find Text In Footer
+ [Template] Table Footer Should Contain With CSS And XPath Locators
+ withHeadAndFoot withHeadAndFoot_AF1
+ withHeadAndFoot withHeadAndFoot_CF1
+ withHeadAndFoot withHeadAndFoot_AF2
+ withHeadAndFoot withHeadAndFoot_CF2
Should Give Error Message When Content Not Found In Table Footer
- Run Keyword And Expect Error Footer in table identified by 'withHeadAndFoot' should have contained text 'withHeadAndFoot_B2'. Table Footer Should Contain withHeadAndFoot withHeadAndFoot_B2
+ [Documentation] Should Give Error Message When Content Not Found In Table Footer
+ Run Keyword And Expect Error
+ ... Footer in table identified by 'withHeadAndFoot' should have contained text 'withHeadAndFoot_B2'.
+ ... Table Footer Should Contain withHeadAndFoot withHeadAndFoot_B2
*** Keywords ***
Table Footer Should Contain With CSS And XPath Locators
- [Arguments] ${tableId} ${content}
- Run Table Keyword With CSS And XPath Locators Table Footer Should Contain ${table id} ${content}
-
+ [Documentation] Table Footer Should Contain With CSS And XPath Locators
+ [Arguments] ${tableId} ${content}
+ Run Table Keyword With CSS And XPath Locators
+ ... Table Footer Should Contain ${table id} ${content}
diff --git a/test/acceptance/keywords/tables/get_table_cell.robot b/test/acceptance/keywords/tables/get_table_cell.robot
index cbd8320e6..f6f8ea344 100644
--- a/test/acceptance/keywords/tables/get_table_cell.robot
+++ b/test/acceptance/keywords/tables/get_table_cell.robot
@@ -1,36 +1,46 @@
*** Settings ***
-Resource table_resource.robot
+Documentation Tests cell contents
+Resource table_resource.robot
*** Test Cases ***
Should Retrieve Text From Cell
- [Template] Table Cell Should Be Equal With CSS And XPath Locators
- simpleTable 1 1 simpleTable_A1
- tableWithSingleHeader 1 1 tableWithSingleHeader_A1
- tableWithSingleHeader 3 3 tableWithSingleHeader_C3
- withHeadAndFoot 1 2 withHeadAndFoot_BH1
- withHeadAndFoot 4 3 withHeadAndFoot_C2
- withHeadAndFoot 6 1 withHeadAndFoot_AF1
- mergedRows 2 1 mergedRows_B2
- mergedCols 1 2 mergedCols_C1
- formattedTable 1 1 formattedTable_A1
- formattedTable 1 4 formattedTable_D1
- formattedTable 2 2 formattedTable_B2
- formattedTable 2 3 formattedTable_ÄÖÜäöüß
- formattedTable 2 4 äöü€&äöü€&
+ [Documentation] Should Retrieve Text From Cell
+ [Template] Table Cell Should Be Equal With CSS And XPath Locators
+ simpleTable 1 1 simpleTable_A1
+ tableWithSingleHeader 1 1 tableWithSingleHeader_A1
+ tableWithSingleHeader 3 3 tableWithSingleHeader_C3
+ withHeadAndFoot 1 2 withHeadAndFoot_BH1
+ withHeadAndFoot 4 3 withHeadAndFoot_C2
+ withHeadAndFoot 6 1 withHeadAndFoot_AF1
+ mergedRows 2 1 mergedRows_B2
+ mergedCols 1 2 mergedCols_C1
+ formattedTable 1 1 formattedTable_A1
+ formattedTable 1 4 formattedTable_D1
+ formattedTable 2 2 formattedTable_B2
+ formattedTable 2 3 formattedTable_ÄÖÜäöüß
+ formattedTable 2 4 äöü€&äöü€&
Should Give Error Message When Content Not Found In Table Cell
- Run Keyword And Expect Error Cell in table 'simpleTable' in row #1 and column #2 should have contained text 'simpleTable_B3'. Table Cell Should Contain simpleTable 1 2 simpleTable_B3
+ [Documentation] Should Give Error Message When Content Not Found In Table Cell
+ Run Keyword And Expect Error
+ ... Cell in table 'simpleTable' in row #1 and column #2 should have contained text 'simpleTable_B3'.
+ ... Table Cell Should Contain simpleTable 1 2 simpleTable_B3
Should Give Error Message When Index Out Of Bounds
- Run Keyword And Expect Error Cell in table 'simpleTable' in row #10 and column #20 should have contained text 'simpleTable_B3'. Table Cell Should Contain simpleTable 10 20 simpleTable_B3
+ [Documentation] Should Give Error Message When Index Out Of Bounds
+ Run Keyword And Expect Error
+ ... Cell in table 'simpleTable' in row #10 and column #20 should have contained text 'simpleTable_B3'.
+ ... Table Cell Should Contain simpleTable 10 20 simpleTable_B3
*** Keywords ***
Table Cell Should Be Equal With CSS And XPath Locators
- [Arguments] ${tableId} ${row} ${col} ${content}
- Run Table Keyword With CSS And XPath Locators Table Cell Should Be Equal ${table id} ${row} ${col} ${content}
+ [Documentation] Should Give Error Message When Index Out Of Bounds
+ [Arguments] ${tableId} ${row} ${col} ${content}
+ Run Table Keyword With CSS And XPath Locators
+ ... Table Cell Should Be Equal ${table id} ${row} ${col} ${content}
Table Cell Should Be Equal
- [Arguments] ${tableId} ${row} ${col} ${content}
- ${cell}= Get Table Cell ${tableId} ${row} ${col}
- Should Be Equal ${cell} ${content}
-
+ [Documentation] Table Cell Should Be Equal
+ [Arguments] ${tableId} ${row} ${col} ${content}
+ ${cell}= Get Table Cell ${tableId} ${row} ${col}
+ Should Be Equal ${cell} ${content}
diff --git a/test/acceptance/keywords/tables/header_should_contain.robot b/test/acceptance/keywords/tables/header_should_contain.robot
index 64d18e7fd..7520265e5 100644
--- a/test/acceptance/keywords/tables/header_should_contain.robot
+++ b/test/acceptance/keywords/tables/header_should_contain.robot
@@ -1,23 +1,29 @@
*** Settings ***
-Resource table_resource.robot
+Documentation Tests header
+Resource table_resource.robot
*** Test Cases ***
Should Find Text In Header
- [Template] Table Header Should Contain With CSS And XPath Locators
- tableWithSingleHeader tableWithSingleHeader_A1
- tableWithSingleHeader tableWithSingleHeader_B1
- tableWithTwoHeaders tableWithTwoHeaders_A1
- tableWithTwoHeaders tableWithTwoHeaders_C2
- withHeadAndFoot withHeadAndFoot_AH1
- withHeadAndFoot withHeadAndFoot_CH1
- withHeadAndFoot withHeadAndFoot_AH2
- withHeadAndFoot withHeadAndFoot_BH2
+ [Documentation] Should Find Text In Header
+ [Template] Table Header Should Contain With CSS And XPath Locators
+ tableWithSingleHeader tableWithSingleHeader_A1
+ tableWithSingleHeader tableWithSingleHeader_B1
+ tableWithTwoHeaders tableWithTwoHeaders_A1
+ tableWithTwoHeaders tableWithTwoHeaders_C2
+ withHeadAndFoot withHeadAndFoot_AH1
+ withHeadAndFoot withHeadAndFoot_CH1
+ withHeadAndFoot withHeadAndFoot_AH2
+ withHeadAndFoot withHeadAndFoot_BH2
Should Give Error Message When Content Not Found In Table Header
- Run Keyword And Expect Error Header in table identified by 'withHeadAndFoot' should have contained text 'withHeadAndFoot_B2'. Table Header Should Contain withHeadAndFoot withHeadAndFoot_B2
+ [Documentation] Should Give Error Message When Content Not Found In Table Header
+ Run Keyword And Expect Error
+ ... Header in table identified by 'withHeadAndFoot' should have contained text 'withHeadAndFoot_B2'.
+ ... Table Header Should Contain withHeadAndFoot withHeadAndFoot_B2
*** Keywords ***
Table Header Should Contain With CSS And XPath Locators
- [Arguments] ${table id} ${expected}
- Run Table Keyword With CSS And XPath Locators Table Header Should Contain ${table id} ${expected}
-
+ [Documentation] Table Header Should Contain With CSS And XPath Locators
+ [Arguments] ${table id} ${expected}
+ Run Table Keyword With CSS And XPath Locators Table Header Should Contain
+ ... ${table id} ${expected}
diff --git a/test/acceptance/keywords/tables/negative_indexes.robot b/test/acceptance/keywords/tables/negative_indexes.robot
index a942b41f0..835c20deb 100644
--- a/test/acceptance/keywords/tables/negative_indexes.robot
+++ b/test/acceptance/keywords/tables/negative_indexes.robot
@@ -1,23 +1,33 @@
*** Settings ***
-Resource table_resource.robot
-Documentation Tests negative indexes in Robot keywords
+Documentation Tests negative indexes in Robot keywords
+Resource table_resource.robot
*** Test Cases ***
Test negative index for CSS strategy in 'Table Row Should Contain'
- Table Row Should Contain tableWithSingleHeader -1 tableWithSingleHeader_A3 tableWithSingleHeader_B3 tableWithSingleHeader_C3
-
+ [Documentation] Test negative index for CSS strategy in 'Table Row Should Contain'
+ Table Row Should Contain tableWithSingleHeader
+ ... -1 tableWithSingleHeader_A3 tableWithSingleHeader_B3 tableWithSingleHeader_C3
+
Test negative index for XPath strategy in 'Table Row Should Contain'
- Table Row Should Contain xpath=//*[@id='tableWithSingleHeader'] -1 tableWithSingleHeader_A3 tableWithSingleHeader_B3 tableWithSingleHeader_C3
+ [Documentation] Test negative index for XPath strategy in 'Table Row Should Contain'
+ Table Row Should Contain xpath=//*[@id='tableWithSingleHeader']
+ ... -1 tableWithSingleHeader_A3 tableWithSingleHeader_B3 tableWithSingleHeader_C3
Test negative index for CSS strategy in 'Table Column Should Contain'
- Table Column Should Contain tableWithSingleHeader -1 tableWithSingleHeader_C2
-
+ [Documentation] Test negative index for CSS strategy in 'Table Column Should Contain'
+ Table Column Should Contain tableWithSingleHeader
+ ... -1 tableWithSingleHeader_C2
+
Test negative index for XPath strategy in 'Table Column Should Contain'
- Table Column Should Contain xpath=//*[@id='tableWithSingleHeader'] -1 tableWithSingleHeader_C2
-
+ [Documentation] Test negative index for XPath strategy in 'Table Column Should Contain'
+ Table Column Should Contain xpath=//*[@id='tableWithSingleHeader']
+ ... -1 tableWithSingleHeader_C2
+
Test negative index for XPath strategy in 'Table Cell Should Contain'
- Table Cell Should Contain simpleTable -1 -2 simpleTable_B3
-
+ [Documentation] Test negative index for XPath strategy in 'Table Cell Should Contain'
+ Table Cell Should Contain simpleTable -1 -2 simpleTable_B3
+
Test negative index for CSS strategy in 'Table Cell Should Contain'
- Table Cell Should Contain xpath=//*[@name='simpleTableName'] -1 -2 simpleTableName_B3
-
\ No newline at end of file
+ [Documentation] Test negative index for CSS strategy in 'Table Cell Should Contain'
+ Table Cell Should Contain xpath=//*[@name='simpleTableName']
+ ... -1 -2 simpleTableName_B3
diff --git a/test/acceptance/keywords/tables/row_should_contain.robot b/test/acceptance/keywords/tables/row_should_contain.robot
index e55869436..3864db953 100644
--- a/test/acceptance/keywords/tables/row_should_contain.robot
+++ b/test/acceptance/keywords/tables/row_should_contain.robot
@@ -1,39 +1,49 @@
*** Settings ***
-Resource table_resource.robot
+Documentation Tests rows content
+Resource table_resource.robot
*** Test Cases ***
Should Find Text In Specific Row
- [Template] Table Row Should Contain With CSS And XPath Locators
- simpleTable 1 simpleTable_A1
- simpleTable 3 simpleTable_C3
- simpleWithNested 1 simpleWithNested_A1
- simpleWithNested 1 nestedTable_A1
- nestedTable 1 nestedTable_A1
- nestedTable 3 nestedTable_C3
- tableWithSingleHeader 1 tableWithSingleHeader_B1
- tableWithSingleHeader 2 tableWithSingleHeader_B2
- withHeadAndFoot 2 withHeadAndFoot_B2
- mergedRows 1 mergedRows_A1
- mergedCols 2 mergedCols_B2
- formattedTable 1 formattedTable_A1
- formattedTable 1 formattedTable_B1
- formattedTable 1 formattedTable_C1
- formattedTable 2 formattedTable_A2
- formattedTable 2 formattedTable_B2
- formattedTable 2 formattedTable_ÄÖÜäöüß
- formattedTable 2 äöü€&äöü€&
+ [Documentation] Should Find Text In Specific Row
+ [Template] Table Row Should Contain With CSS And XPath Locators
+ simpleTable 1 simpleTable_A1
+ simpleTable 3 simpleTable_C3
+ simpleWithNested 1 simpleWithNested_A1
+ simpleWithNested 1 nestedTable_A1
+ nestedTable 1 nestedTable_A1
+ nestedTable 3 nestedTable_C3
+ tableWithSingleHeader 1 tableWithSingleHeader_B1
+ tableWithSingleHeader 2 tableWithSingleHeader_B2
+ withHeadAndFoot 2 withHeadAndFoot_B2
+ mergedRows 1 mergedRows_A1
+ mergedCols 2 mergedCols_B2
+ formattedTable 1 formattedTable_A1
+ formattedTable 1 formattedTable_B1
+ formattedTable 1 formattedTable_C1
+ formattedTable 2 formattedTable_A2
+ formattedTable 2 formattedTable_B2
+ formattedTable 2 formattedTable_ÄÖÜäöüß
+ formattedTable 2 äöü€&äöü€&
-Should Find Text In Specific Row with CSS Specific Mechnanics
- Table Row Should Contain formattedTable 1 formattedTable_D1
+Should Find Text In Specific Row with CSS Specific Mechanics
+ [Documentation] Should Find Text In Specific Row with CSS Specific Mechanics
+ Table Row Should Contain formattedTable 1 formattedTable_D1
Should Give Error Message When Content Not Found In Table Row
- Run Keyword And Expect Error Row #2 in table identified by 'simpleTable' should have contained text 'simpleTable_B3'. Table Row Should Contain simpleTable 2 simpleTable_B3
+ [Documentation] Should Give Error Message When Content Not Found In Table Row
+ Run Keyword And Expect Error
+ ... Row #2 in table identified by 'simpleTable' should have contained text 'simpleTable_B3'.
+ ... Table Row Should Contain simpleTable 2 simpleTable_B3
Should Give Error Message When Row Number Out Of Bounds
- Run Keyword And Expect Error Row #20 in table identified by 'simpleTable' should have contained text 'simpleTable_B3'. Table Row Should Contain simpleTable 20 simpleTable_B3
+ [Documentation] Should Give Error Message When Row Number Out Of Bounds
+ Run Keyword And Expect Error
+ ... Row #20 in table identified by 'simpleTable' should have contained text 'simpleTable_B3'.
+ ... Table Row Should Contain simpleTable 20 simpleTable_B3
*** Keywords ***
Table Row Should Contain With CSS And XPath Locators
- [Arguments] ${table id} ${row} ${expected}
- Run Table Keyword With CSS And XPath Locators Table Row Should Contain ${table id} ${row} ${expected}
-
+ [Documentation] Table Row Should Contain With CSS And XPath Locators
+ [Arguments] ${table id} ${row} ${expected}
+ Run Table Keyword With CSS And XPath Locators Table Row Should Contain
+ ... ${table id} ${row} ${expected}
diff --git a/test/acceptance/keywords/tables/table_resource.robot b/test/acceptance/keywords/tables/table_resource.robot
index 09a418e9f..31f037cb4 100644
--- a/test/acceptance/keywords/tables/table_resource.robot
+++ b/test/acceptance/keywords/tables/table_resource.robot
@@ -1,14 +1,16 @@
*** Settings ***
-Resource ../../resource.robot
+Documentation Keywords to test tables
+Resource ../../resource.robot
*** Keywords ***
Run Table Keyword With CSS And XPath Locators
- [Arguments] ${keyword} ${table id} @{args}
- Run Keyword ${keyword} ${table id} @{args}
- ${xpath}= Get Table XPath ${table id}
- Run Keyword ${keyword} ${xpath} @{args}
+ [Documentation] Run Table Keyword With CSS And XPath Locators
+ [Arguments] ${keyword} ${table id} @{args}
+ Run Keyword ${keyword} ${table id} @{args}
+ ${xpath}= Get Table XPath ${table id}
+ Run Keyword ${keyword} ${xpath} @{args}
Get Table XPath
- [Arguments] ${table id}
- [Return] xpath=//table[@id="${table id}"]
-
+ [Documentation] Get Table XPath
+ [Arguments] ${table id}
+ [Return] xpath=//table[@id="${table id}"]
diff --git a/test/acceptance/keywords/tables/table_should_contain.robot b/test/acceptance/keywords/tables/table_should_contain.robot
index 1e7f64fa7..bb97d3b16 100644
--- a/test/acceptance/keywords/tables/table_should_contain.robot
+++ b/test/acceptance/keywords/tables/table_should_contain.robot
@@ -1,48 +1,57 @@
*** Settings ***
-Resource table_resource.robot
+Documentation Tests table contents
+Resource table_resource.robot
*** Test Cases ***
Should Find Text In Table Content
- [Template] Verify Table Contains With CSS And XPath Locators
- simpleTable simpleTable_A1
- simpleTable simpleTable_C3
- simpleWithNested simpleWithNested_A1
- simpleWithNested nestedTable_A1
- nestedTable nestedTable_A1
- nestedTable nestedTable_C3
- tableWithSingleHeader tableWithSingleHeader_B1
- tableWithSingleHeader tableWithSingleHeader_B2
- withHeadAndFoot withHeadAndFoot_AH1
- withHeadAndFoot withHeadAndFoot_B2
- withHeadAndFoot withHeadAndFoot_CF1
- mergedRows mergedRows_A1
- mergedCols mergedCols_B2
- formattedTable formattedTable_A1
- formattedTable formattedTable_B1
- formattedTable formattedTable_C1
- formattedTable formattedTable_A2
- formattedTable formattedTable_B2
- formattedTable formattedTable_ÄÖÜäöüß
- formattedTable äöü€&äöü€&
+ [Documentation] Should Find Text In Table Content
+ [Template] Verify Table Contains With CSS And XPath Locators
+ simpleTable simpleTable_A1
+ simpleTable simpleTable_C3
+ simpleWithNested simpleWithNested_A1
+ simpleWithNested nestedTable_A1
+ nestedTable nestedTable_A1
+ nestedTable nestedTable_C3
+ tableWithSingleHeader tableWithSingleHeader_B1
+ tableWithSingleHeader tableWithSingleHeader_B2
+ withHeadAndFoot withHeadAndFoot_AH1
+ withHeadAndFoot withHeadAndFoot_B2
+ withHeadAndFoot withHeadAndFoot_CF1
+ mergedRows mergedRows_A1
+ mergedCols mergedCols_B2
+ formattedTable formattedTable_A1
+ formattedTable formattedTable_B1
+ formattedTable formattedTable_C1
+ formattedTable formattedTable_A2
+ formattedTable formattedTable_B2
+ formattedTable formattedTable_ÄÖÜäöüß
+ formattedTable äöü€&äöü€&
-Should Find Text In Table Content with CSS Specific Mechnanics
- Table Should Contain formattedTable formattedTable_D1
+Should Find Text In Table Content with CSS Specific Mechanics
+ [Documentation] Should Find Text In Table Content with CSS Specific Mechanics
+ Table Should Contain formattedTable formattedTable_D1
Should Give Error Message When Content Not Found In Table
- [Template] Table Should Contain Fails With CSS And XPath Locators
- simpleTable Not here
+ [Documentation] Should Give Error Message When Content Not Found In Table
+ [Template] Table Should Contain Fails With CSS And XPath Locators
+ simpleTable Not here
*** Keywords ***
Verify Table Contains With CSS And XPath Locators
- [Arguments] ${table id} ${expected}
- Run Table Keyword With CSS And XPath Locators Table Should Contain ${table id} ${expected}
+ [Documentation] Verify Table Contains With CSS And XPath Locators
+ [Arguments] ${table id} ${expected}
+ Run Table Keyword With CSS And XPath Locators Table Should Contain
+ ... ${table id} ${expected}
Table Should Contain Fails With CSS And XPath Locators
- [Arguments] ${table id} ${expected}
- Run Table Keyword With CSS And XPath Locators Table Should Contain Fails ${table id} ${expected}
+ [Documentation] Table Should Contain Fails With CSS And XPath Locators
+ [Arguments] ${table id} ${expected}
+ Run Table Keyword With CSS And XPath Locators Table Should Contain Fails
+ ... ${table id} ${expected}
Table Should Contain Fails
- [Arguments] ${locator} ${expected}
- ${err}= Set Variable Table identified by '${locator}' should have contained text '${expected}'.
- Run Keyword And Expect Error ${err} Table Should Contain ${locator} ${expected}
-
+ [Documentation] Table Should Contain Fails
+ [Arguments] ${locator} ${expected}
+ ${err}= Set Variable
+ ... Table identified by '${locator}' should have contained text '${expected}'.
+ Run Keyword And Expect Error ${err} Table Should Contain ${locator} ${expected}
diff --git a/test/acceptance/keywords/textfields.robot b/test/acceptance/keywords/textfields.robot
index 6e0f82c6a..e0ff2739a 100644
--- a/test/acceptance/keywords/textfields.robot
+++ b/test/acceptance/keywords/textfields.robot
@@ -1,40 +1,42 @@
-*Setting*
-Variables variables.py
-Resource ../resource.robot
-Test Setup Go To Page "forms/prefilled_email_form.html"
-
-
-*Test Cases*
+*** Setting ***
+Documentation Test textfields
+Test Setup Go To Page "forms/prefilled_email_form.html"
+Variables variables.py
+Resource ../resource.robot
+*** Test Cases ***
Get Value From Text Field
- ${text} = Get Value name
- Should Be Equal ${text} Prefilled Name
- Clear Element Text name
- ${text} = Get Value name
- Should Be Equal ${text} ${EMPTY}
-
+ [Documentation] Get Value From Text Field
+ ${text} = Get Value name
+ Should Be Equal ${text} Prefilled Name
+ Clear Element Text name
+ ${text} = Get Value name
+ Should Be Equal ${text} ${EMPTY}
Input Unicode In Text Field
- Input Text name ${unic_text}
- ${text} = Get Value name
- Should Be Equal ${text} ${unic_text}
+ [Documentation] Input Unicode In Text Field
+ Input Text name ${unic_text}
+ ${text} = Get Value name
+ Should Be Equal ${text} ${unic_text}
Input Password
- [Documentation] LOG 3 Typing password into text field 'password_field'
- [Setup] Go To Page "forms/login.html"
- Input Text username_field username
- Input Password password_field password
- Submit Form
- Verify Location Is "forms/submit.html"
+ [Documentation] LOG 3 Typing password into text field 'password_field'
+ [Setup] Go To Page "forms/login.html"
+ Input Text username_field username
+ Input Password password_field password
+ Submit Form
+ Verify Location Is "forms/submit.html"
Press Key
[Setup] Go To Page "forms/login.html"
Cannot Be Executed in IE
- Input Text username_field James Bond
- Press Key password_field f
- Press Key password_field \\9
- Press Key login_button \\10
+ Press Key username_field James Bon
+ Press Key username_field \\100
+ Textfield Value Should Be username_field James Bond
+ Press Key password_field f
+ Press Key login_button \\10
Verify Location Is "forms/submit.html"
Attempt Clear Element Text On Non-Editable Field
- Run Keyword And Expect Error * Clear Element Text can_send_email
+ [Documentation] Attempt Clear Element Text On Non-Editable Field
+ Run Keyword And Expect Error * Clear Element Text can_send_email
diff --git a/test/acceptance/keywords/waiting.robot b/test/acceptance/keywords/waiting.robot
index 1cac96a3e..abccb8df5 100644
--- a/test/acceptance/keywords/waiting.robot
+++ b/test/acceptance/keywords/waiting.robot
@@ -1,53 +1,85 @@
*** Settings ***
-Test Setup Go To Page "javascript/delayed_events.html"
-Resource ../resource.robot
+Documentation Tests waiting
+Test Setup Go To Page "javascript/delayed_events.html"
+Resource ../resource.robot
*** Test Cases ***
Wait For Condition
- Title Should Be Original
- Wait For Condition return window.document.title == "Changed"
- Run Keyword And Expect Error Condition 'return window.document.title == "Invalid"' did not become true in 100 milliseconds Wait For Condition return window.document.title == "Invalid" ${0.1}
+ [Documentation] Wait For Condition
+ Title Should Be Original
+ Wait For Condition return window.document.title == "Changed"
+ Run Keyword And Expect Error
+ ... Condition 'return window.document.title == "Invalid"' did not become true in 100 milliseconds
+ ... Wait For Condition return window.document.title == "Invalid" ${0.1}
Wait Until Page Contains
- Wait Until Page Contains New Content 2 s
- Run Keyword And Expect Error Text 'invalid' did not appear in 100 milliseconds Wait Until Page Contains invalid 0.1
+ [Documentation] Wait Until Page Contains
+ Wait Until Page Contains New Content 2 s
+ Run Keyword And Expect Error Text 'invalid' did not appear in 100 milliseconds
+ ... Wait Until Page Contains invalid 0.1
Wait Until Page Does Not Contain
- Wait Until Page Does Not Contain This is content 2 s
- Run Keyword And Expect Error Text 'Initially hidden' did not disappear in 100 milliseconds Wait Until Page Does Not Contain Initially hidden 0.1
+ [Documentation] Wait Until Page Does Not Contain
+ Wait Until Page Does Not Contain This is content 2 s
+ Run Keyword And Expect Error Text 'Initially hidden' did not disappear in 100 milliseconds
+ ... Wait Until Page Does Not Contain Initially hidden 0.1
Wait Until Page Contains Element
- [Documentation] Tests also that format characters (e.g. %c) are handled correctly in error messages
- Wait Until Page Contains Element new div 2 seconds
- Run Keyword And Expect Error Element '%cnon-existent' did not appear in 100 milliseconds Wait Until Page Contains Element %cnon-existent 0.1 seconds
+ [Documentation] Tests also that format characters (e.g. %c) are handled correctly in error messages
+ Wait Until Page Contains Element new div 2 seconds
+ Run Keyword And Expect Error Element '%cnon-existent' did not appear in 100 milliseconds
+ ... Wait Until Page Contains Element %cnon-existent 0.1 seconds
Wait Until Page Does Not Contain Element
- [Documentation] Tests also that format characters (e.g. %c) are handled correctly in error messages
- Wait Until Page Does Not Contain Element not_present 2 seconds
- Run Keyword And Expect Error Element 'content' did not disappear in 100 milliseconds Wait Until Page Does Not Contain Element content 0.1 seconds
+ [Documentation] Tests also that format characters (e.g. %c) are handled correctly in error
+ ... messages
+ Wait Until Page Does Not Contain Element not_present 2 seconds
+ Run Keyword And Expect Error Element 'content' did not disappear in 100 milliseconds
+ ... Wait Until Page Does Not Contain Element content 0.1 seconds
Wait Until Element Is Visible
- Run Keyword And Expect Error Element 'hidden' was not visible in 100 milliseconds Wait Until Element Is Visible hidden 0.1
- Wait Until Element Is Visible hidden 2 s
- Run Keyword And Expect Error Element locator 'invalid' did not match any elements after 100 milliseconds Wait Until Element Is Visible invalid 0.1
- Run Keyword And Expect Error User error message Wait Until Element Is Visible invalid 0.1 User error message
+ [Documentation] Wait Until Element Is Visible
+ Run Keyword And Expect Error Element 'hidden' was not visible in 100 milliseconds
+ ... Wait Until Element Is Visible hidden 0.1
+ Wait Until Element Is Visible hidden 2 s
+ Run Keyword And Expect Error
+ ... Element locator 'invalid' did not match any elements after 100 milliseconds
+ ... Wait Until Element Is Visible invalid 0.1
+ Run Keyword And Expect Error
+ ... User error message Wait Until Element Is Visible invalid 0.1
+ ... User error message
Wait Until Element Is Enabled
- Run Keyword And Expect Error Element 'id=disabled' was not enabled in 100 milliseconds Wait Until Element Is Enabled id=disabled 0.1
- Wait Until Element Is Enabled id=disabled 2 s
- Run Keyword And Expect Error Element locator 'id=invalid' did not match any elements after 100 milliseconds Wait Until Element Is Enabled id=invalid 0.1
- Run Keyword And Expect Error User error message Wait Until Element Is Enabled id=invalid 0.1 User error message
+ [Documentation] Wait Until Element Is Enabled
+ Run Keyword And Expect Error Element 'id=disabled' was not enabled in 100 milliseconds
+ ... Wait Until Element Is Enabled id=disabled 0.1
+ Wait Until Element Is Enabled id=disabled 2 s
+ Run Keyword And Expect Error
+ ... Element locator 'id=invalid' did not match any elements after 100 milliseconds
+ ... Wait Until Element Is Enabled id=invalid 0.1
+ Run Keyword And Expect Error User error message Wait Until Element Is Enabled
+ ... id=invalid 0.1 User error message
Wait Until Element Contains
- Run Keyword And Expect Error Text 'New' did not appear in 100 milliseconds to element 'id=content'. Its text was 'This is content'. Wait Until Element Contains id=content New 0.1
- Wait Until Element Contains content New Content 2 s
- Wait Until Element Contains content New 2 s
- Run Keyword And Expect Error User error message Wait Until Element Contains content Error 0.1 User error message
- Run Keyword And Expect Error ValueError: Element locator 'id=invalid' did not match any elements. Wait Until Element Contains id=invalid content 0.1
+ [Documentation] Wait Until Element Contains
+ Run Keyword And Expect Error
+ ... Text 'New' did not appear in 100 milliseconds to element 'id=content'. Its text was 'This is content'.
+ ... Wait Until Element Contains id=content New 0.1
+ Wait Until Element Contains content New Content 2 s
+ Wait Until Element Contains content New 2 s
+ Run Keyword And Expect Error
+ ... User error message Wait Until Element Contains
+ ... content Error 0.1 User error message
+ Run Keyword And Expect Error
+ ... ValueError: Element locator 'id=invalid' did not match any elements.
+ ... Wait Until Element Contains id=invalid content 0.1
Wait Until Element Does Not Contain
- Run Keyword And Expect Error Text 'This is' did not disappear in 100 milliseconds from element 'id=content'. Wait Until Element Does Not Contain id=content This is 0.1
- Wait Until Element Does Not Contain content This is 2 s
- Wait Until Element Does Not Contain id=content content 2 s
- Run Keyword And Expect Error User error message Wait Until Element Does Not Contain content New Content 0.1 User error message
-
+ [Documentation] Wait Until Element Does Not Contain
+ Run Keyword And Expect Error
+ ... Text 'This is' did not disappear in 100 milliseconds from element 'id=content'.
+ ... Wait Until Element Does Not Contain id=content This is 0.1
+ Wait Until Element Does Not Contain content This is 2 s
+ Wait Until Element Does Not Contain id=content content 2 s
+ Run Keyword And Expect Error User error message Wait Until Element Does Not Contain
+ ... content New Content 0.1 User error message
diff --git a/test/acceptance/locators/custom.robot b/test/acceptance/locators/custom.robot
index e02d1d3fd..05f29d3af 100644
--- a/test/acceptance/locators/custom.robot
+++ b/test/acceptance/locators/custom.robot
@@ -1,25 +1,14 @@
*** Settings ***
-Suite Setup Go To Page "index.html"
-Resource ../resource.robot
-
-*** Keywords ***
-Setup Custom Locator
- [Arguments] ${persist}=${EMPTY}
- Add Location Strategy custom Custom Locator Strategy persist=${persist}
-
-Teardown Custom Locator
- Remove Location Strategy custom
-
-Custom Locator Strategy
- [Arguments] ${browser} ${criteria} ${tag} ${constraints}
- ${retVal}= Execute Javascript return window.document.getElementById('${criteria}') || [];
- [Return] ${retVal}
+Documentation Test custom locators
+Suite Setup Go To Page "index.html"
+Resource ../resource.robot
*** Test Cases ***
Test Custom Locator
- [Setup] Setup Custom Locator
- Page Should Contain Element custom=some_id
- Page Should Not Contain Element custom=invalid_id
+ [Documentation] Test Custom Locator
+ [Setup] Setup Custom Locator
+ Page Should Contain Element custom=some_id
+ Page Should Not Contain Element custom=invalid_id
Ensure Locator Auto Unregisters
[Documentation] Checks to see if the custom locator registered in the last
@@ -28,18 +17,38 @@ Ensure Locator Auto Unregisters
Setup Custom Locator
Ensure Attempting to Unregister a Default Locator Fails
+ [Documentation] Ensure Attempting to Unregister a Default Locator Fails
Run Keyword And Expect Error * Remove Location Strategy id
Ensure Unregistering a Non-Existent Locator Does Not Fail
+ [Documentation] Ensure Unregistering a Non-Existent Locator Does Not Fail
Teardown Custom Locator
Ensure a Custom Locator can be Unregistered
+ [Documentation] Ensure a Custom Locator can be Unregistered
Setup Custom Locator persist
Teardown Custom Locator
# Test step is used for the next test. It sets up a persistant locator.
Setup Custom Locator persist
Ensure Locators Can Persist
- Page Should Contain Element custom=some_id
+ [Documentation] Ensure Locators Can Persist
+ Page Should Contain Element custom=some_id
Run Keyword And Expect Error * Setup Custom Locator
[Teardown] Teardown Custom Locator
+
+*** Keywords ***
+Setup Custom Locator
+ [Arguments] ${persist}=${EMPTY}
+ [Documentation] Setup Custom Locator
+ Add Location Strategy custom Custom Locator Strategy persist=${persist}
+
+Teardown Custom Locator
+ [Documentation] Teardown Custom Locator
+ Remove Location Strategy custom
+
+Custom Locator Strategy
+ [Arguments] ${browser} ${criteria} ${tag} ${constraints}
+ [Documentation] Custom Locator Strategy
+ ${retVal}= Execute Javascript return window.document.getElementById('${criteria}') || [];
+ [Return] ${retVal}
diff --git a/test/acceptance/locators/sizzle.robot b/test/acceptance/locators/sizzle.robot
index 926893999..24d21b8ed 100644
--- a/test/acceptance/locators/sizzle.robot
+++ b/test/acceptance/locators/sizzle.robot
@@ -1,15 +1,18 @@
*** Settings ***
+Documentation Tests JQuery
Test Setup Go To Page "jquery.html"
Resource ../resource.robot
*** Test Cases ***
Find By Id
+ [Documentation] Find By Id
Page Should Contain Element jquery=#div_id
Element Should Contain jquery=#foo Text and image
Click Link sizzle=#some_id
Title Should Be (root)/broken.html
Find In Table
+ [Documentation] Find In Table
Table Should Contain jquery=table#simpleTable simpleTable
Table Header Should Contain jquery=table#tableWithTwoHeaders tableWithTwoHeaders_C2
Table Footer Should Contain jquery=table#withHeadAndFoot withHeadAndFoot_AF1
@@ -20,6 +23,7 @@ Find In Table
Table Cell Should Contain jquery=h2.someClass ~ table:last-child 2 4 äöü€&äöü€&
Find By Everything Else
+ [Documentation] Find By Everything Else
Page Should Contain Element jquery=[href="index.html"]
Element Should Contain jquery=[target="_blank"] Target opens in new window
Click Link sizzle=:has(img[alt="tooltip"])
diff --git a/test/acceptance/multiple_browsers.robot b/test/acceptance/multiple_browsers.robot
index a60dfbb46..819e06cf0 100644
--- a/test/acceptance/multiple_browsers.robot
+++ b/test/acceptance/multiple_browsers.robot
@@ -1,41 +1,52 @@
*** Settings ***
-Suite Setup Open Two Browsers And Register Indexes
-Suite Teardown Close All Browsers
-Resource resource.robot
+Documentation Several instances of browser
+Suite Setup Open Two Browsers And Register Indexes
+Suite Teardown Close All Browsers
+Resource resource.robot
*** Test Cases ***
Last Opened Browser Should Be Active
+ [Documentation] Tests if browser is active
Verify Location Is "links.html"
It Should Be Possible To Switch Between Browsers Using Indexes
- Switch Browser ${BROWSER1}
+ [Documentation] Tests switching browsers
+ Switch Browser ${BROWSER1}
Verify Location Is ""
It Should Be Give An Alias To New Browser Instance
- Open Browser ${ROOT}/forms/prefilled_email_form.html ${BROWSER} Third Browser remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
+ [Documentation] Tests browser alias
+ Open Browser ${ROOT}/forms/prefilled_email_form.html ${BROWSER} Third Browser
+ ... remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
Verify Location Is "forms/prefilled_email_form.html"
- Switch Browser ${BROWSER1}
+ Switch Browser ${BROWSER1}
Verify Location Is ""
- Switch Browser Third Browser
+ Switch Browser Third Browser
Verify Location Is "forms/prefilled_email_form.html"
It Should Be Possible Close A Browser
- Open Browser ${ROOT}/forms/prefilled_email_form.html ${BROWSER} Third remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
- Switch Browser ${BROWSER2}
+ [Documentation] Tests closing browsers
+ Open Browser ${ROOT}/forms/prefilled_email_form.html ${BROWSER} Third
+ ... remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
+ Switch Browser ${BROWSER2}
Close Browser
- Switch Browser Third
+ Switch Browser Third
Close Browser
- ${BROWSER2} = Open Browser ${ROOT}/links.html ${BROWSER} remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
-
+ ${BROWSER2} = Open Browser ${ROOT}/links.html ${BROWSER} remote_url=${REMOTE_URL}
+ ... desired_capabilities=${DESIRED_CAPABILITIES}
Correct Error Message Should Be Given When Trying To Switch To Non-Existing Browser
- Run Keyword And Expect Error No browser with index or alias 'non-existing' found. Switch Browser non-existing
+ [Documentation] Tests error message
+ Run Keyword And Expect Error No browser with index or alias 'non-existing' found.
+ ... Switch Browser non-existing
*** Keywords ***
Open Two Browsers And Register Indexes
+ [Documentation] Opens two idexed browsers
Cannot Be Executed in IE
- ${BROWSER1} = Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
- ${BROWSER2} = Open Browser ${ROOT}/links.html ${BROWSER} remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
- Set Suite Variable $BROWSER1
- Set Suite Variable $BROWSER2
-
+ ${BROWSER1} = Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
+ ... desired_capabilities=${DESIRED_CAPABILITIES}
+ ${BROWSER2} = Open Browser ${ROOT}/links.html ${BROWSER} remote_url=${REMOTE_URL}
+ ... desired_capabilities=${DESIRED_CAPABILITIES}
+ Set Suite Variable $BROWSER1
+ Set Suite Variable $BROWSER2
diff --git a/test/acceptance/open_and_close.robot b/test/acceptance/open_and_close.robot
index 282c96c26..b46af0b21 100644
--- a/test/acceptance/open_and_close.robot
+++ b/test/acceptance/open_and_close.robot
@@ -1,30 +1,32 @@
*** Settings ***
-Resource resource.robot
-Suite Teardown Close All Browsers
+Documentation Opening and closing browsers
+Suite Teardown Close All Browsers
+Resource resource.robot
*** Test Cases ***
Browser Should Open And Close
- Open Browser To Start Page Without Testing Default Options
- Close Browser
+ [Documentation] Opens and closes browser
+ Open Browser To Start Page Without Testing Default Options
+ Close Browser
Browser Open With Implicit Wait Should Not Override Default
- Open Browser To Start Page And Test Implicit Wait 10
+ [Documentation] Opens browser with implicit wait
+ Open Browser To Start Page And Test Implicit Wait 10
Close Browser
-
There Should Be A Good Error Message If Browser Is Not Opened
- Run Keyword And Expect Error No browser is open Title Should Be foo
+ [Documentation] Tests error message
+ Run Keyword And Expect Error No browser is open Title Should Be foo
Close Browser Does Nothing When No Browser Is Opened
+ [Documentation] Close already closed browser
Close Browser
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 2:2 DEBUG STARTS: DELETE
- ... LOG 2:3 DEBUG Finished Request
-
- Run Keyword And Expect Error *
- ... Open Browser bad.url.bad ${BROWSER}
- Close All Browsers
+ [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 2:2 DEBUG STARTS: DELETE
+ ... LOG 2:3 DEBUG Finished Request
+ Run Keyword And Expect Error * Open Browser bad.url.bad ${BROWSER}
+ Close All Browsers
diff --git a/test/acceptance/resource.robot b/test/acceptance/resource.robot
old mode 100755
new mode 100644
index 35784b96a..2c9b63e0e
--- a/test/acceptance/resource.robot
+++ b/test/acceptance/resource.robot
@@ -1,62 +1,72 @@
-*Setting*
-Library Selenium2Library run_on_failure=Nothing implicit_wait=0
-Library Collections
-Library OperatingSystem
+*** Setting ***
+Library Selenium2Library run_on_failure=Nothing implicit_wait=0
+Library Collections
+Library OperatingSystem
+*** Variable ***
+${SERVER} localhost:7000
+${BROWSER} firefox
+${REMOTE_URL} ${NONE}
+${DESIRED_CAPABILITIES} ${NONE}
+${ROOT} http://${SERVER}/html
+${FRONT PAGE} ${ROOT}/
+${SPEED} 0
-*Variable*
-${SERVER} localhost:7000
-${BROWSER} firefox
-${REMOTE_URL} ${NONE}
-${DESIRED_CAPABILITIES} ${NONE}
-${ROOT} http://${SERVER}/html
-${FRONT PAGE} ${ROOT}/
-${SPEED} 0
-
-
-*Keyword*
+*** Keyword ***
Open Browser To Start Page
- [Documentation] This keyword also tests 'Set Selenium Speed' and 'Set Selenium Timeout' against all reason.
- ${default speed} ${default timeout} =
- ... Open Browser To Start Page Without Testing Default Options
- Should Be Equal ${default speed} 0 seconds
- Should Be Equal ${default timeout} 5 seconds
+ [Documentation] This keyword also tests 'Set Selenium Speed' and 'Set Selenium Timeout'
+ ... against all reason.
+ ${default speed} ${default timeout} = Open Browser To Start Page Without Testing Default Options
+ Should Be Equal ${default speed} 0 seconds
+ Should Be Equal ${default timeout} 5 seconds
Open Browser To Start Page Without Testing Default Options
- Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
- ${orig speed} = Set Selenium Speed ${SPEED}
- ${orig timeout} = Set Selenium Timeout 10 seconds
- [Return] ${orig speed} 5 seconds
+ [Documentation] Open Browser To Start Page Without Testing Default Options
+ Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
+ ... desired_capabilities=${DESIRED_CAPABILITIES}
+ ${orig speed} = Set Selenium Speed ${SPEED}
+ ${orig timeout} = Set Selenium Timeout 10 seconds
+ [Return] ${orig speed} 5 seconds
Open Browser To Start Page And Test Implicit Wait
- [DOCUMENTATION] This keyword tests that 'Set Selenium Implicit Wait' and 'Get Selenium Implicit Wait' work as expected
- [ARGUMENTS] ${implicit_wait}
- Should Not Be Equal 0 ${implicit_wait} Please do not pass in a value of 0 for the implicit wait argument for this function
- ${old_wait}= Set Selenium Implicit Wait ${implicit_wait}
- Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
- ${default_implicit_wait} = Get Selenium Implicit Wait
- Should Be Equal ${implicit_wait} seconds ${default_implicit_wait}
+ [Arguments] ${implicit_wait}
+ [Documentation] This keyword tests that 'Set Selenium Implicit Wait' and
+ ... 'Get Selenium Implicit Wait' work as expected
+ Should Not Be Equal 0 ${implicit_wait}
+ ... Please do not pass in a value of 0 for the implicit wait argument for this function
+ ${old_wait}= Set Selenium Implicit Wait ${implicit_wait}
+ Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
+ ... desired_capabilities=${DESIRED_CAPABILITIES}
+ ${default_implicit_wait} = Get Selenium Implicit Wait
+ Should Be Equal ${implicit_wait} seconds ${default_implicit_wait}
#be sure to revert the implicit wait to whatever it was before so as to not effect other tests
- Set Selenium Implicit Wait ${old_wait}
+ Set Selenium Implicit Wait ${old_wait}
Cannot Be Executed In IE
- ${runsInIE}= Set Variable If "${BROWSER}".replace(' ', '').lower() in ['ie', '*iexplore', 'internetexplorer'] ${TRUE}
- Run Keyword If ${runsInIE} Set Tags ie-incompatible
- Run Keyword If ${runsInIE} Fail And Set Non-Critical This test does not work in Internet Explorer
+ [Documentation] Cannot Be Executed In IE
+ ${runsInIE}= Set Variable If "${BROWSER}".replace(' ', '').lower() in ['ie', '*iexplore', 'internetexplorer'] ${TRUE}
+ Run Keyword If ${runsInIE} Set Tags ie-incompatible
+ Run Keyword If ${runsInIE} Fail And Set Non-Critical
+ ... This test does not work in Internet Explorer
Fail And Set Non-Critical
- [Arguments] ${msg}
- Remove Tags regression
- Fail ${msg}
+ [Arguments] ${msg}
+ [Documentation] Fails And Set Non-Critical
+ Remove Tags regression
+ Fail ${msg}
Go to Front Page
- Go To ${FRONT PAGE}
+ [Documentation] Goes to front page
+ Go To ${FRONT PAGE}
Go To Page "${relative url}"
- Go To ${ROOT}/${relative url}
+ [Documentation] Goes to page
+ Go To ${ROOT}/${relative url}
Set ${level} Loglevel
- Set Log Level ${level}
+ [Documentation] Sets loglevel
+ Set Log Level ${level}
Verify Location Is "${relative url}"
- Location Should Be ${ROOT}/${relative url}
+ [Documentation] Verifies location
+ Location Should Be ${ROOT}/${relative url}
diff --git a/test/acceptance/windows.robot b/test/acceptance/windows.robot
index 59f81ffd6..a963538f2 100644
--- a/test/acceptance/windows.robot
+++ b/test/acceptance/windows.robot
@@ -1,61 +1,68 @@
-*Setting*
-Documentation These tests must open own browser because windows opened by
-... earlier tests would otherwise be visible to Get Window XXX keywords
-... even if those windows were closed.
-Suite Setup Open Browser To Start Page Without Testing Default Options
-Test Setup Go To Page "javascript/popupwindow.html"
-Suite Teardown Close All Browsers
-Resource resource.robot
-
-*Test Cases*
+*** Setting ***
+Documentation These tests must open own browser because windows opened by
+... earlier tests would otherwise be visible to Get Window XXX keywords
+... even if those windows were closed.
+Suite Setup Open Browser To Start Page Without Testing Default Options
+Suite Teardown Close All Browsers
+Test Setup Go To Page "javascript/popupwindow.html"
+Resource resource.robot
+
+*** Test Cases ***
Popup Windows Created With Javascript
- Cannot Be Executed in IE
- Open Popup Window, Select It And Verify myName
- Do Action In Popup Window And Verify
- Select Main Window And Verify
+ [Documentation] Popup Windows Created With Javascript
+ Cannot Be Executed in IE
+ Open Popup Window, Select It And Verify myName
+ Do Action In Popup Window And Verify
+ Select Main Window And Verify
Get Window Titles
- [Tags] Known Issue - TravisCI
- ${exp_titles}= Create List Click link to show a popup window Original
- Click Link my popup
- ${titles}= Get Window Titles
- Should Be Equal ${titles} ${exp_titles}
+ [Documentation] Get Window Titles
+ [Tags] Known Issue - TravisCI
+ ${exp_titles}= Create List Click link to show a popup window Original
+ Click Link my popup
+ ${titles}= Get Window Titles
+ Should Be Equal ${titles} ${exp_titles}
Get Window Names
- ${exp_names}= Create List selenium_main_app_window myName
- Click Link my popup
- ${names}= Get Window Names
- Should Be Equal ${names} ${exp_names}
+ [Documentation] Get Window Names
+ ${exp_names}= Create List selenium_main_app_window myName
+ Click Link my popup
+ ${names}= Get Window Names
+ Should Be Equal ${names} ${exp_names}
Get Window Identifiers
- ${exp_ids}= Create List undefined undefined
- Click Link my popup
- ${ids}= Get Window Identifiers
- Should Be Equal ${ids} ${exp_ids}
+ [Documentation] Get Window Identifiers
+ ${exp_ids}= Create List undefined undefined
+ Click Link my popup
+ ${ids}= Get Window Identifiers
+ Should Be Equal ${ids} ${exp_ids}
Get and Set Window Size
- ${win_width}= Set Variable ${600}
- ${win_height}= Set Variable ${800}
- Set Window Size ${win_width} ${win_height}
- ${returned_width} ${returned_height}= Get Window Size
- Should Be Equal ${returned_width} ${win_width}
- Should Be Equal ${returned_height} ${win_height}
-
+ [Documentation] Get and Set Window Size
+ ${win_width}= Set Variable ${600}
+ ${win_height}= Set Variable ${800}
+ Set Window Size ${win_width} ${win_height}
+ ${returned_width} ${returned_height}= Get Window Size
+ Should Be Equal ${returned_width} ${win_width}
+ Should Be Equal ${returned_height} ${win_height}
Get and Set Window Position
- ${position_x}= Set Variable ${100}
- ${position_y}= Set Variable ${100}
- Set Window Position ${position_x} ${position_y}
- ${returned_x} ${returned_y}= Get Window Position
- Should Be Equal ${position_x} ${returned_x}
- Should Be Equal ${position_y} ${returned_y}
+ [Documentation] Get and Set Window Position
+ ${position_x}= Set Variable ${100}
+ ${position_y}= Set Variable ${100}
+ Set Window Position ${position_x} ${position_y}
+ ${returned_x} ${returned_y}= Get Window Position
+ Should Be Equal ${position_x} ${returned_x}
+ Should Be Equal ${position_y} ${returned_y}
Select Window By Title After Close Window
+ [Documentation] Select Window By Title After Close Window
Cannot Be Executed in IE
Open Popup Window, Select It And Verify myName
Close Popup Window And Select Main Window By Title
Get Window Titles After Close Window
+ [Documentation] Get Window Titles After Close Window
[Tags] Known Issue - TravisCI
Cannot Be Executed in IE
Open Popup Window, Select It And Verify myName
@@ -63,55 +70,62 @@ Get Window Titles After Close Window
${titles}= Get Window Titles
Select Window By Handle
- Cannot Be Executed in IE
- Click Link my popup
- ${parent}= Select Window Original
- Title Should Be Original
- ${child}= Select Window ${parent}
- Title Should Be Click link to show a popup window
- Select Window ${child}
- Close Window
- ${FromWindow}= Select Window ${parent}
- Title Should Be Click link to show a popup window
- Should Be True ${FromWindow} == None
+ [Documentation] Select Window By Handle
+ Cannot Be Executed in IE
+ Click Link my popup
+ ${parent}= Select Window Original
+ Title Should Be Original
+ ${child}= Select Window ${parent}
+ Title Should Be Click link to show a popup window
+ Select Window ${child}
+ Close Window
+ ${FromWindow}= Select Window ${parent}
+ Title Should Be Click link to show a popup window
+ Should Be True ${FromWindow} == None
Select Popup Window By Excluded List
- Cannot Be Executed in IE
- @{excluded_handle_list}= List Windows
- Click Link my popup
- ${parent}= Select Window ${excluded_handle_list}
- Title Should Be Original
- Close Window
- Select Window ${parent}
- Title Should Be Click link to show a popup window
+ [Documentation] Select Popup Window By Excluded List
+ Cannot Be Executed in IE
+ @{excluded_handle_list}= List Windows
+ Click Link my popup
+ ${parent}= Select Window ${excluded_handle_list}
+ Title Should Be Original
+ Close Window
+ Select Window ${parent}
+ Title Should Be Click link to show a popup window
Select Window By Special Locator
- Cannot Be Executed in IE
- ${start}= Select Window self
- Click Link my popup
- ${parent}= Select Window new
- Title Should Be Original
- Should Be True '${start}' == '${parent}'
- Close Window
- Select Window main
- Title Should Be Click link to show a popup window
+ [Documentation] Select Window By Special Locator
+ Cannot Be Executed in IE
+ ${start}= Select Window self
+ Click Link my popup
+ ${parent}= Select Window new
+ Title Should Be Original
+ Should Be True '${start}' == '${parent}'
+ Close Window
+ Select Window main
+ Title Should Be Click link to show a popup window
-*Keywords*
+*** Keywords ***
Open Popup Window, Select It And Verify
- [Arguments] ${window_id}
- Click Link my popup
- Select Window ${window_id}
- Title should Be Original
+ [Arguments] ${window_id}
+ [Documentation] Open Popup Window, Select It And Verify
+ Click Link my popup
+ Select Window ${window_id}
+ Title should Be Original
Select Main Window And Verify
- Close Window
- Select Window main
- Title Should Be Click link to show a popup window
+ [Documentation] Select Main Window And Verify
+ Close Window
+ Select Window main
+ Title Should Be Click link to show a popup window
Do Action In Popup Window And Verify
- Click Link change title
- Title Should Be Changed
+ [Documentation] Do Action In Popup Window And Verify
+ Click Link change title
+ Title Should Be Changed
Close Popup Window And Select Main Window By Title
+ [Documentation] Close Popup Window And Select Main Window By Title
Close Window
Select Window title=Click link to show a popup window