Selenium IQ Question: How to validate the data in the Dynamic HTML Table is sorted???
--------------------------------------------------------------------------------------------------
https://www.w3schools.com/howto/howto...
Scenario:
========
1. Perform SORT functionality.
2. Retrieve the List from HTML Table.
3. Store the values in Array
4. Compare the Strings using the compareTo() function
5. Validate the Results.
public int compareTo(String anotherString)
***Note***
the value 0 if the argument string is equal to this string;
a value less than 0 if this string is lexicographically less than the string argument;
and a value greater than 0 if this string is lexicographically greater than the string argument.
String s1 = "JAVA";
String s2 = "SELENIUM";
String s3 ="JAVA";
s1.compareTo(s2) - less than 0 -1
s2.compareTo(s1) - greater than 0 +1
s1.compareTo(s3) - == 0
Check out the blog as well http://total-qa.com
PlayList Details:
SOAPUI:
• SOAPUI
JIRA:
SELENIUM INTERVIEW QUESTIONS:
• Selenium Interview Questions
PAGE OBJECT MODEL PRINCIPLES:
• PageObjectModel
JENKINS:
• JENKINS
REST API TUTORIAL:
• REST API TUTORIAL
JAVA:
• Java
SELENIUM WEBDRIVER:
• Selenium WebDriver
XPATHTUTORIAL:
• Xpath Tutorial
CssSelector:
• Css Tutorial
GITHUB:
• GITHUB