Java Program for selenium interview

Reverse word in String using split function
Reverse every word in String using split function
Reverse a String using recrursion
Check a palindrome string
Find duplicate characters in String
Find vowels in a String
Find duplicate words in String
Count the number of words in a string?
Count the total number of occurrences of a given character in a string
Count oocurance of each character in a String
Check whether one string is a rotation of another?
Check two Stringa are anagram or not ?
Reverse a given string with preserving the position of spaces
Find the percentage of uppercase letters, lowercase letters, digits and special characters in a given string?
Find the longest substring without a duplicate character
Swap two Strings without using 3rd variable
Find first repeated and non-repeated character in String
Occurance of "that" word in a string like, AbthatCdthatjkthatggggthatth
print all permutations of String
find out longest palindrome in a given string

Rarely used locators - But very power full





ByChained locator helps to find the element based on the parent element, it accepts unlimited number of locators, Sequence is parent, child, grand child, great Grand child, target.

ByChained is normally used when its not possible to identify an element using one single attribute but you need to employ multiple attributes to identify it.

ByAll locator in selenium helps to find the element based on the given locators, locator could be any other types like id, name, classname, link text, xpath, css, partial link text.

ByAll locator tries to find the element using first locator if the element is not present then it waits for given implicit wait time, once it reaches the maximum wait time and if there is no element, ByAll method tries to find the element using second locator and goes on.

Finding element continues till it finds the element or there is no more locators