- Verify that upon selecting a specific location, the services to be availed and the date, all available doctors information present in the selected area offering the chosen services should get displayed. 2.Verify that the "Map" link would open the Google maps listing the exact location of the clinic.
- Verify that depending upon the services we select the Different possible options from Clinic care, Video care or/and chat care would get displayed.
- Verify that the "View Clinic Services" link shows all services offered by the specific clinic.
- Verify that upon clicking on a specific doctors name link all possible services that is offered by the doctor are getting displayed.
- Verify that the search result content for a clinic Visit displays clinic, doctors details and the available Date time slots .
- Verify that the search result content for a Video care displays doctors details and the available Date time slots .
- Verify that the "info" link displays a summary of the information related to the data displayed on the page.
- Verify that by using "Use My Location" link would display all possible services available near your location.
- Verify that only current day or future date appointments could be scheduled, scheduling past day appointments is not possible.
1. Open Zoomcare application Schedule Page: url- https://www.zoomcare.com/schedule
2. Select a location.
3. Select a service.
4. Select a Date and click Refresh button
5. Verify that the all clinics available in selected location offering selected Service gets displayed.
1. Open Zoomcare application Schedule Page: url- https://www.zoomcare.com/schedule
2. Select a location.
3. Select a service.
4. Select a Date and click Refresh button
5. Click on Map link.
6. Verify that Google page gets opened in a new window for the corresponding address.
1. Open Zoomcare application Schedule Page: url- https://www.zoomcare.com/schedule
2. Select a location.
3. Select a service.
4. Select a Date and click Refresh button
5. Verify that Clinic care, vedio care and chat care services are available for selected locatio/services.
This is a automation framework based on Page Object Model design pattern for Selenium WebDriver with Java, maven and TestNG. It also integrates Extent Reports for reporting.
Note :
This framework uses PageFactory method to store the WebElements in the page objects. The elements are initialized in the constructors of their respective page objects with the help of PageFactory.initElements
-
Eclipse Plugin - If you want to run your tests from Eclipse as TestNG Suite, you need to download TestNG in Eclipse through available software site- TestNG.
-
Maven Dependencies - This framework has been designed with following maven dependencies as defined further in the pom.xml.
Dependency Version Purpose Selenium WebDriver 3.141 It automates the testing of web application. TestNG 7.3.0 To run the tests as a suite. Extent Reports 5.0.6 To genarate Enhanced html reports after test run. APACHE Commons IO 2.8.0 To perform file opeartions. webdrivermanager 4.3.1 WebDriverManager is a library which allows to automate the management of the drivers (e.g. chromedriver, geckodriver, etc.) required by Selenium WebDriver. Apache POI 5.0.0 To read and write .xls excel files (e.g. test data files) POI-OOXML 5.0.0 To read and write .xlsx excel files (e.g. test data files)
-
First of all, you need to download your maven depenedencies using any of the maven commands such as Go to- 1. Eclipse> Project Explorer 2. Right click on the project. 3. Maven> Update Project.
-
The automation framework is built to address following 4 major requirements through it's components.
- Setup the WebDriver to automate actions on browser.
- Read test data from test data file(formats such as .xls, .json, .xml etc.)
- Page Classes for each page containing locators of their respective WebElements and methods to operate on them.
- Test Classes containing Test cases in the form of methods with annotation @Test.
- Execution control- We are executing our tests through testng.xml. It can be other options such as through mvn test or command line.
- Create a readable html report after test execution.
-
Every Test method has annotation @test. This is the place where we have all the checkpoints. This class utilizes TestNG annotations to handle the flow of test execution in the given order.
-
@BeforeSuite-
- Setup the chromedriver binaries using below:
WebDriverManager.chromedriver().setup(); - Initialize the WebDriver driver
- Initialize the Logger logger
- loads the test data file and initialize it in testdata
- Setup the chromedriver binaries using below:
-
@BeforeMethod-
- Create a test in Extent Report before each test.
- Navigate a urland maximize the window.
-
@Test-
- Initialize the page objects.
- Validation steps by calling the page objects.
-
@AfterMethod
- End the logging for the test.
-
@AfterSuite
- End the test suite in logging
- Quit the WebDriver instance
-
-
We create page classes for each of the pages of our application.
Each page class contains two components as below.
- Locators are written as below
@FindBy(xpath="//div[@class='g']//h3/span") WebElement firstResult;
- Page class methods for tests steps
- Page class constructor sets the driver and initializes the webelements through
PageFactory.initElements(driver, this);
-
If you want to run your tests through testng.xml , You can perform following steps.
- Eclipse>Project Explorer
- Open/Expand the project
- Right click on the testng.xml
- Run As> TestNG Suite
It will run all the tests as per defined classes in the the file.
-
If you want to run your tests through maven, You can perform following steps.
- Eclipse> Project Explorer
- Right click on the project.
- Run As> Maven test.
It will automatically run all the tests as per below convention.
- Classes under src/test/java
- Class name with text Test in the beginneing or end
- Test methods with annotation @test