Created
February 20, 2019 12:43
-
-
Save bigprof/b609bd8a2a5a698afcc894b77976565c to your computer and use it in GitHub Desktop.
Sample Robot Framework script for checking if a certain site appears in the first results page when searching Google for specific keywords.
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
*** Settings *** | |
Library Selenium2Library | |
Suite Setup start browser | |
Suite Teardown end browser | |
*** Variables *** | |
${browser} = ff | |
*** Keywords *** | |
start browser | |
Open Browser about:blank ${browser} | |
Maximize Browser Window | |
Go To https://google.com | |
Click link English | |
end browser | |
Close All Browsers | |
*** Test Cases *** | |
Google should return our website when searching for php | |
Go To https://google.com | |
Input text q PHP | |
Press key name=q \\13 | |
Wait Until Page Contains php.net | |
Capture page screenshot | |
Google should return our website when searching for file_get_contents | |
Go To https://google.com | |
Input text q file_get_contents | |
Press key name=q \\13 | |
Wait Until Page Contains php.net | |
Capture page screenshot | |
Google should return our website when searching for mysqli_connect | |
Go To https://google.com | |
Input text q mysqli_connect | |
Press key name=q \\13 | |
Wait Until Page Contains php.net | |
Capture page screenshot | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment