Skip to content

Instantly share code, notes, and snippets.

@leorush
Created October 2, 2019 13:25
Show Gist options
  • Save leorush/744f2b2b3a55ea1d5237c99ba032b013 to your computer and use it in GitHub Desktop.
Save leorush/744f2b2b3a55ea1d5237c99ba032b013 to your computer and use it in GitHub Desktop.
# Copy/paste the line below into Terminal to execute:
# robot -d results tests/amazon.robot
Test Teardown Close Browser
*** Variables ***
*** Test Cases ***
User must sign in to check out
[Documentation] This is some basic info about the test
[Tags] Smoke
Open Browser http://www.amazon.com chrome
Wait Until Page Contains Your Amazon.com
Input Text id=twotabsearchtextbox Ferrari 458
Click Button xpath=//*[@id="nav-search"]/form/div[2]/div/input
Wait Until Page Contains results for "Ferrari 458"
Click Element css:.a-carousel-row #anonCarousel1 li:nth-child(1) .a-section h2 a
Wait Until Page Contains Back to results
Click Button id=add-to-cart-button
Wait Until Page Contains Added to Cart
Wait Until Element Is Visible css:#attach-sidesheet-checkout-button .a-button-input
Click Element css:#attach-sidesheet-checkout-button .a-button-input
Page Should Contain Element continue
Close Browser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment