Automation QA Testing Course Content

Automation Scenarios For Practice

excercisees -automation scenario:

0)https://ecommerce-playground.lambdatest.io/index.php?route=common/home
1)https://bookcart.azurewebsites.net/
2)https://practice.automationtesting.in/test-cases/
3)https://www.saucedemo.com/
4)https://demos.bellatrix.solutions/contact-form/
5)https://opensource-demo.orangehrmlive.com/web/index.php/auth/login


Scenario:1
1)open the rediff.com website in any browser
2)fetch the current page title, current page absolute url, current page window id
3)Click on Create account link
4)type the fullname in fullname editbox
5)select female radio button
6)select the day,month and year option from dropdowns
7)navigate back to previous page
8)close the browser


Scenario2:
1)open the google.com --call all the browser methods
2)verify the page title.
3)type the selenium keyword in search editbox.
4)submit on the search editbox
5)verify the search results page title
6)verify the search results count text is present in the webpage or not.
7)fetch the search results count text and extract the only count from search results count text.
8)click on Selenium link.
9)verify selenium website homepage title
10)click on downloads tab
11)verify the selenium downloads page title
12)navigate back to previous page--
13)verify selenium website homepage title
14)navigate to download page--use navigate().forward().
15)verify the selenium downloads page title

scenario -3
1)Open yahoo.com --use all the browser methods..
2)verify the page title.
3)type the selenium keyword in search editbox.
4)click on the search button
5)verify the search results page title
6)fetch the results text and  extract the results count.
//div[@class='compPagination']//span
//a[@class='next']/following::span
-------------------------------------------------


scenario -4
1)open the rediff.com
2)verify the page title
3)click on create account link.
4)verify the page title -Rediffmail Free Unlimited Storage
5)select Thailand from country dropdown.

Scenario5:
1)open the rediff.com
2)verify the page title
3)click on create a rediffmail account link.
4)verify the page title -Rediffmail Free Unlimited Storage
5)select bangalore city from city dropdown.

scenario-6 --using Select class
1)open the https://www.amazon.com
2)verify the page title.
3)select an option from categories dropdown.

Scenario:
1)open the ebay.com
2)select an option from dropdown using select class


MultiSelection dropdown Scenario:
1)open the url:https://openwritings.net/sites/default/files/selenium-test-pages/select.html
2)identify the multi selection dropdown
3)select mulitple options
4)fetch all the selected options
5)deselect one by one
=========================================

How To Test for Disabled Elements with Selenium?

Solution is:
@Test
    public void test() {
        driver.get("http://the-internet.herokuapp.com/dropdown");
        Select dropdown = new Select(driver.findElement(By.id("dropdown")));
        assertThat(dropdown.getOptions().get(0).isEnabled(), is(false));
    }
========================================
isSelected()/isDisplayed()/isEnabled() scenario:
1)open the rediff.com
2)verify any element in the  landing page
3)Click on Signin link
4)verify the next page title-RediffMail
5)verify whether remember me checkbox is checked or not if not check the remember me checkbox
6)uncheck the checkbox.
7)close the browser
================================
Linkedin General footer section links Scenario:
Scenario steps:
1)Open linkedin.com website
2)identify the general section element
3)fetch all the links under general section
4)fetch each link text, URL and click on each link
5)verify each link title in next page
6)navigate back to previous page
entire General section: //div[contains(@class,'w-full flex justify-end pl')]/div[1]/ul

1st link XPath
//div[contains(@class,'w-full flex justify-end pl')]/div[1]/ul/li[1]/a
2nd link XPath
//div[contains(@class,'w-full flex justify-end pl')]/div[1]/ul/li[2]/a
3rd link Xpath
//div[contains(@class,'w-full flex justify-end pl')]/div[1]/ul/li[3]/a
//parameterizing the XPath//div[contains(@class,'w-full flex justify-end pl')]/div[1]/ul/li["+i+"]/a

top 250 links in IMDB
2)Fetch all 250 movies into the collection
3)fetch each movie text, Url

total 250 links xpath:///ul[contains(@class,'ipc-metadata-list')]/li/div[2]/div/div/div[1]/a
 --
common xpath for all movie links
//ul[contains(@class,'ipc-metadata-list')]/li/div[2]/div/div/div[1]/a

parameterising top 250 links xpath
//ul[contains(@class,'ipc-metadata-list')]/li["+i+"]/div[2]/div/div/div[1]/a

Top 35 inspirational movies :
2)fetch all 35 inspirational movies into collection using below xpath
3)fetch each movie link text and url
4)click on each movie
5)verify the next page headertext or page title
6)navigate back to previous page


Common xpath to get all links into List: below xpath will give total 35 links
//ul[contains(@class,'ipc-metadata-list')]/li/div/div/div/div[1]/div[2]/div[1]/a

individual links xpath
//ul[contains(@class,'ipc-metadata-list')]/li[1]/div/div/div/div[1]/div[2]/div[1]/a
//ul[contains(@class,'ipc-metadata-list')]/li[2]/div/div/div/div[1]/div[2]/div[1]/a

parameterization of xpath:
//ul[contains(@class,'ipc-metadata-list')]/li["+i+"]/div/div/div/div[1]/div[2]/div[1]/a
 (or) below one
String xpath1  = "//ul[contains(@class,'ipc-metadata-list')]/li[";
String xpath2 = "]/div/div/div/div[1]/div[2]/div[1]/a";

usage example
driver.findElement(By.xpath(xpath1 + i + xpath2));
NOTE: here 'i' is for loop variable for paramerizing the xpath
-------------------------------------------------------------------
scrolling scenario
1)open the amazon.in
2)verify the page title
3)select an option from categories dropdown
4)type the value in search editbox
5)click on search torch icon
6)verify search results count
7)scroll down using JavascriptExecutor interface
8)scroll down the page until Nextpage link is visible
============================================
Recaptcha handling:
  • Open a web browser and navigate to the contact form page at https://demos.bellatrix.solutions/contact-form/.
  • Fill in the contact form with random but valid information (first name, last name, email, etc.).
  • Verify and submit by clicking the verify button within the reCAPTCHA.
  • Switch back to the main content.
  • Submit the contact form.
  • Quit the web browser after completing the captcha handling test.
===========================================
//scenario 7: handling the alert
1)open rediff.com
2)verify the page title
3)click on sign in link.
4)verify the sign in page title
5)click on Go button
6)handle the alert
7)type the username value in username editbox.
8)check whether checkbox is checked or not

Alerts Example URL:http://only-testing-blog.blogspot.com/2014/01/textbox.html


Frame Scenario:
1)open https://the-internet.herokuapp.com/nested_frames website.

2)fetch number of frames in the webpage.
3)switch to Left & Middle frame
4)fetch the Middle text
5)Switch back to original frame

Example 2

  • Open the browser
  • Visit the page - https://the-internet.herokuapp.com/tinymce
  • Switch to the frame that contains the TinyMCE editor
  • Find and store the text in the editor
  • Clear the text in the editor
  • Input new text in the editor
  • Find and store the new text in the editor
  • Assert that the original and new text entries don't match
  • Switch to the top level of the page
  • Grab the text from the top of the page and assert it's what we expect
  • Close the browser

InternalFrames scenario:
1)open http://jqueryui.com/
2)verify the page title.--jQuery UI
3)click on Autocomplete link under widgets section.
4)verify the page title.--Autocomplete | jQuery UI
5)switch to iframe 
6)type the tags value inn tags editbox
7)navigate back to previoius page
8)verify the page title
9)click on Accordion link.
10)verify the page title.--Accordion | jQuery UI

write a simple test case for the “Create New Post” functionality it would look like this:

𝐒𝐭𝐞𝐩𝐬 𝐭𝐨 𝐀𝐮𝐭𝐨𝐦𝐚𝐭𝐞:

1) Navigate to: https://www.redbus.in/
2) Select the From and To destination as per your choice.
3) Select the Date as Tomorrow's date and then Search Buses.
4) From the result, Click on any Bus 'View Seats' buttons
5) The Bus Seats available chart will be displayed - print the number of available & allocated seats.
6) From your choice Select any Available Seat from the Chart.


Go to http://demo.opensourcecms.com/wordpress/wp-login.php
Enter “admin” in the “Username” field
Enter “demo123” in the “Password” field
Click on the “Log In” button
Verify that the text “Howdy, admin” is present
Click on the “Posts” link
Click on the “Add New” button
Type “Selenium Demo Post” in the title field
Click on the “Publish” button
Verify that the text “Post published” is present
-----------------------------------------------------
Launch the WordPress site
Open the Admin Login page
Enter valid login data
Navigate to the Write Post page
Write the post
Publish the post
Verify that it was actually post

Popup scenario:
Q. Implement a method named loginTest() for the following scenario:
URL:"https://artsandculture.google.com/
 * step1 - You will navigate to some web page that has a ‘SIGN IN’ link, click on it.
 * step2 - It opens a new tab to sign in, navigate to that new tab.
 * step3 - Enter the username/password and hit next.

 * step4 - You will be signed in, verify that the profile image is displayed

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.