Learning Objectives
contains
in XPath expressions
(a bit like a partial check-in XPath)Tip: Use simple locators whenever possible
Review: refresh the page
Tip: Be aware of elements with the same ID
Test Case 45
Continue from #34: adding non-time-based service.
Test Design
Log in as a business
Create several service (i.e. billing) items
Log out
Log in as a client
Visit the business’ store URL
/biz/wise-pool/store
Select a billing item and quantity (multiple)
Verify the total amount in the shopping cart
Refresh the page
Click the cart icon and verify the total amount
This is to verify the session, don’t forget to test this for session-related test cases
Test Data (Login) :
Site URL: https://whenwise.agileway.net
Login (Business): pool@biz.com
Login (Customer): james@client.com
Password: test01
Tasks
Task 1. Select Quantity for a Billing Item (dropdown)
The quantity selection is a drop down box.
Even though the ID locator is recommended in the general case, experienced test engineers would NOT use ID locator this time, like below.
driver.find_element(:id, "quantity-33")
Why? The id’s 33
might change in the next release.
One way to use XPath locator. The statements below select quantity “2” for the first billing item.
Keep reading with a 7-day free trial
Subscribe to The Agile Way to keep reading this post and get 7 days of free access to the full post archives.