Friday, December 23, 2016
How to configure jenkins for user access without login authentication
Tuesday, December 6, 2016
Tutorials to understand TestNG for Selenium Webdriver
Installing TestNG in eclipse - This post explains how to install TestNG in eclipse.
MindMap for TestNG - Understanding the concept in TestNG using MindMap.
Annotations in TestNG - Different annotations used in TestNG
Assertion and Soft Assertions in Selenium Webdriver using TestNG - What are different assertions and soft assertions in selenium webdriver. What is the difference between assertions and soft assertion. How to use assertion in the test.
Maven POM.xml: Dependencies for Selenium, TestNG and junit - How to add TestNG dependenies in maven project.
Using dependencies and priority in TestNG tests: Ordering tests execution - how to define dependencies between tests and priotising order of tests execution in TestNG.
Creating TestNG.xml to run Selenium test suites - How to create testNG xml file for executing testsuite in TestNG. This article explains, how to create xml file for execution in different scenarios.
How to run multiple test suites in TestNG? - Suppose we have individual suite for different module. This article explains how to create testNG xml file to run multiple test suites.
Maven POM.xml: Dependencies for Selenium, TestNG and junit - How to add dependencies for TestNG in Maven POM.xml
Sunday, November 27, 2016
Validating conditions using assert and verify in Selenium IDE
The purpose of any automation/manual tests is to validate the application is working correctly and validating the actual outcome with the expected outcome for a condition.
Similar to assert/verify commands in selenium IDE, we can use assert and soft.assert class for assert and verify command in Selenium Webdriver.
- Now the first question arises, what are the commands in selenium IDE which validates the outcome of condition There are different commands in different tools/automated suite. In selenium IDE, we can use assert or verify commands to validate the results.
- Now the question two arises, what is the difference between assert and verify commands, When we use Assert command, it checks whether the given condition is true or false and stops further test execution if the assert statement fails. In case of verify command, in case the execution fails, the execution moves to next step in the test although the test is marked as failed.
- Now coming to question three, when to use verify or assert command. In case of critical condition failing and no point to continue with test, use assert command. In case of minor condition failing in the test and we still wants to continue with further steps in the test, we can use verify statement.
- So what is the next logical question in mind, when and how to add the validation steps in test.Since Selenium IDE is a record and play tool,
- Record execution flow. Once execution flow is recorded, we can add assertions in Selenium IDE.
- Just right click the element on which the condition needs to be verified in Firefox browser e.g : Validating the text of the link.
- Click on the assertion to be added as shown below:
- Record execution flow. Once execution flow is recorded, we can add assertions in Selenium IDE.
- Just right click the element on which the condition needs to be verified in Firefox browser e.g : Validating the text of the link.
- Click on the assertion to be added as shown below:
Similar to assert/verify commands in selenium IDE, we can use assert and soft.assert class for assert and verify command in Selenium Webdriver.
Subscribe to:
Posts (Atom)