Member-only story
21. Verify Logged out Properly & Run the same against against two different browsers
How to run tests across different browsers in Selenium WebDriver
4 min readJul 30, 2023
Learning Objectives
- Verify a simple and obvious operation, such as logout
- Browser navigation in Selenium WebDriver
- Run the same automated test against different browsers, e.g. Chrome, Firefox, etc. Get concept of Cross Browser Testing
- Test Execution set up for different browsers
Test Case #21
In the previous session, we wrote a simple user login test (the simplest and the most common one).
it "Login ok" do
driver.find_element(:link_text, "SIGN IN").click
driver.find_element(:id, "email").send_keys("yoga@biz.com")
driver.find_element(:id, "password").send_keys("test01")
driver.find_element(:xpath, "//input[@id='remember_me']/../span").click
driver.find_element(:id, "login-btn").click
expect(page_text).to include("You have signed in successfully")
visit("/sign-out") # logout
end
We verified “Logged in” by checking the text You have signed in successfully
. But did we verify the logged out? NO.