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

Post a Comment