- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are assertions available to test relational comparisons in Selenium with python?
There are numerous assertions available to test relational comparisons in Selenium. They are listed below −
assertGreater – This assertion has two parameters. A comparison is done between the first and second parameter. In case the first parameter is greater than the second one, the test case is considered a pass; else the test case is failed.
The third parameter of assertGreater is an optional one. It is mostly used for informational purposes for result analysis.
Syntax
assertGreater(3, 2)
assertGreaterEqual – This assertion has two parameters. A comparison is done between the first and second parameter. In case the first parameter is greater than equal to the second one, the test case is considered a pass; else the test case is failed.
The third parameter of assertGreaterEqual is an optional one. It is mostly used for informational purposes for result analysis.
Syntax
assertGreater(2, 2)
assertLesser – This assertion has two parameters. A comparison is done between the first and second parameter. In case the first parameter is less than the second one, the test case is considered a pass; else the test case is failed.
The third parameter of assertLesser is an optional one. It is mostly used for informational purposes for result analysis.
Syntax
assertLesser(2, 3)
assertLesserEqual – This assertion has two parameters. A comparison is done between the first and second parameter. In case the first parameter is less than equal to the second one, the test case is considered a pass; else the test case is failed.
The third parameter of assertLesserEqual is an optional one. It is mostly used for informational purposes for result analysis.
Syntax
assertLesserEqual(1, 3)
- Related Articles
- What are assertions in Selenium with python?
- What are the various waits available in Selenium with python?
- What are the methods available for handling static dropdowns in a page in Selenium with python?
- Is navigate method available in Selenium Webdriver with Python?
- How to trigger headless test execution in Selenium with Python?
- Describe some of the exceptions available in Selenium with python?
- What are the different types of wait available in Selenium?
- What are assertions in Python and how are they carried out?
- What are ActionChains class in Selenium with python?
- What are the various methods available under Select class in Selenium?
- Assertions in Python
- What are relational operators in C#?
- What are environment variables available in Python CGI Programming?
- What are the modules available in Python for converting PDF to text?
- File and Directory Comparisons in Python
