Selenium Interview Question: Validate the data in the Dynamic HTML Table is sorted lexicographically

preview_player
Показать описание
Selenium IQ Question: How to validate the data in the Dynamic HTML Table is sorted???
--------------------------------------------------------------------------------------------------

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";

PlayList Details:
SOAPUI:
JIRA:

SELENIUM INTERVIEW QUESTIONS:
PAGE OBJECT MODEL PRINCIPLES:
JENKINS:
REST API TUTORIAL:
JAVA:
SELENIUM WEBDRIVER:
XPATHTUTORIAL:
CssSelector:
GITHUB:
Рекомендации по теме
Комментарии
Автор

I find this super interesting! Does HasData provide features to simplify scraping sorted data from dynamic tables?

ChristianReyes-rk
Автор

Good explanation, can we reduce some steps for comparing and display to console with sorted and not sorted results.

ashishchaurasia
join shbcf.ru