Following selectors are allowed in this scenario:
id
name
xpath (absolute and relative only, dynarnic(axes) xpath is not allowed)
linkText (partialLink Text is not allowed)
Scenario:
- Use Before Method annotated Setup method named as
beforeMethod() to:
vaasuki.g
The driver property can be set by using geckodriver as follows:
System.setProperty('webdriver.gecko.driver', '/home/pg_user/Desktop/geckodriver');
Launch the application using the url:
http://localhost:8080/application/index.html (If not loaded, refer the Table1: Common issues and their resolutions)
Maximize the browser.
Give an implicit wait of 10 seconds.
- test1() test method:
Click on Add a Member.
Get the data for each member from Data.xls and enter it in the designated field. After adding each member, write the success message in the "status" column of Data.xls and refresh the page. (Data.xls is present at /home/pg_user/Desktop/Additional Supplied Files)
Verify whether the Home link is hidden.
If hidden print "Home link is not available."
else click on it
- test2() test method:
Click on Already a Member?
Login using the below credentials.
Username: ivs kevin
Password: illumination
Verify if "Welcome ivs_kevin" is present in the page by using TestNG Soft Assertions.
If the role is "Co-Educator", print the course and educator/co-educator on the console from the Session Detail table.
For the default course which is already selected, Click on Remove Last Course.
- test3() test method:
Click on Already a Member?
Login using the below credentials.
Username: ivs kevin
Password: illumination
If the total number of entries, including the header, in the Session Detail table is less than or equal to 6:
Add the course "Agile Testing" and the role "Co-Educator" from the dropdown menu, then click Add Details in the Add Course section.
else, print "Issue with webtable."
Print the current url on console.
Take the screenshot of current page as "Image.PNG" and save it at /home/pg_user/Desktop/Additional SuppliedFiles/Screenshots folder.
Click on SignOut.
- Use After Method annotated tearDown method named as afterMethod() to:
Quit the driver.
Top comments (0)