Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit 020ef71

Browse files
committed
tests: updated test cases due target page changes
Removed Google search tests due to bad UI testability
1 parent 8e8e518 commit 020ef71

File tree

5 files changed

+16
-28
lines changed

5 files changed

+16
-28
lines changed

src/test/robotframework/objects/Google.Site.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Go To
2424
${Current.Location}= Get Location
2525
Run Keyword If '${Current.Location}'!='${Google.Site.Url}' SeleniumLibrary.Go To ${Google.Site.Url}
2626
Title Should Be ${Google.Site.PageTitle}
27-
Handle Cookie Consent xpath:(//div[@role="none"])[last()]
27+
Handle Cookie Consent //*[@id="L2AGLb"]
2828

2929
Close
3030
Close Browser

src/test/robotframework/settings/Settings.robot

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ Test
1717
1818
Handle Cookie Consent
1919
[Arguments] ${consent click xpath}
20+
Reload Page
2021
Comment Consent search causes stack overflow to jbrowser, so tagging tescases using this keyword
2122
Set Tags jbrowser
2223
${count} Get Matching Xpath Count ${consent click xpath}
2324
IF ${count} > 0
25+
Capture Page Screenshot
26+
Wait Until Element Is Clickable ${consent click xpath} 30s
2427
Click Element ${consent click xpath}
2528
END

src/test/robotframework/testsuites/UnitTests/AW3Schools.robot

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ ${URL Application} http://www.w3schools.com
99
*** Test Cases ***
1010
Select
1111
[Tags] jbrowser
12-
Open Browser https://developer.mozilla.org/en/docs/Web/HTML/Element/select#Examples ${browser} mainbrowser
13-
Wait Until Page Contains Element frame_Basic_select
14-
Select Frame frame_Basic_select
15-
Wait Until Page Contains Element xpath://select[@name="choice"]
16-
Select From List xpath://select[@name="choice"] Third Value
17-
${label} Get Selected List Label xpath://select[@name="choice"]
18-
Should Be Equal ${label} Third Value
19-
List Selection Should Be xpath://select[@name="choice"] Third Value
12+
Open Browser https://interactive-examples.mdn.mozilla.net/pages/tabbed/select.html ${browser} mainbrowser
13+
Wait Until Page Contains Element output-iframe
14+
Select Frame output-iframe
15+
Wait Until Page Contains Element xpath://select[@name="pets"]
16+
Select From List xpath://select[@name="pets"] Spider
17+
${label} Get Selected List Label xpath://select[@name="pets"]
18+
Should Be Equal ${label} Spider
19+
List Selection Should Be xpath://select[@name="pets"] Spider
2020

2121
Multiple Browsers
2222
Open Browser ${URL Application} ${browser} mainbrowser1

src/test/robotframework/testsuites/UnitTests/Google.robot

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,10 @@ Open And Close Google Site
1010
Capture Page Screenshot
1111

1212
Store Web Element In JavaScript
13-
Wait Until Page Contains Element //*[contains(@class,'gsfi')]
14-
Execute Javascript window.document.my_element = window.document.getElementsByClassName('gsfi')[0];
13+
Wait Until Page Contains Element //*[contains(@class,'gLFyf')]
14+
Execute Javascript window.document.my_element = window.document.getElementsByClassName('gLFyf')[0];
1515
${className}= Execute Javascript return window.document.my_element.className;
16-
Should Contain ${className} gsfi
17-
18-
Search Robotframework Selenium2Library
19-
Google.Search.Search String Robotframework Selenium2Library Java
20-
21-
Search With JavaScript Locator
22-
SeleniumLibrary.Add Location Strategy elementByName return window.document.getElementsByName(arguments[0])[0];
23-
Input Text elementByName:q Robotframework Selenium2Library Java
24-
Press Key elementByName:q \\13
25-
Wait Until Element Is Visible xpath://a[contains(.,'MarkusBernhardt')]
26-
Capture Page Screenshot
27-
28-
Search Without Locator Type
29-
Input Text q Robotframework Selenium2Library Java
30-
Press Key q \\13
31-
Wait Until Element Is Visible //a[contains(.,'MarkusBernhardt')]
16+
Should Contain ${className} gLFyf
3217

3318
Get Name Of Active Element With JavaScript
3419
Input Text q Robotframework Selenium2Library

src/test/robotframework/testsuites/UnitTests/WhatAreCookies.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Library String
66
*** Test Cases ***
77
Cookies
88
Open Browser http://www.whatarecookies.com/cookietest.asp ${browser} mainbrowser
9-
Handle Cookie Consent cookieconsent_btn
9+
Handle Cookie Consent xpath://*[@id="cookieconsent_btn"]
1010
${all_cookies} Get Cookies
1111
${first cookie name} Split String ${all_cookies} =
1212
${test} Get Cookie Value ${first cookie name}[0]

0 commit comments

Comments
 (0)