Interview Questions

SELENIUM REAL TIME INTERVIEW QUESTIONS - How we can retrieve the dynamically changing Ids? When we login Facebook the login label's id changes dynamically thus resulting in failure.

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

SELENIUM REAL TIME INTERVIEW QUESTIONS - How we can retrieve the dynamically changing Ids? When we login Facebook the login label's id changes dynamically thus resulting in failure.

We have a hierarchy of locators and Facebook Is dynamic in nature,so we are not able to use "id" for identification for after that we have remaining 7 locator's for that :2. xpath ().. 3. name..4. css.. 5. link text.. 6. partiallinktext...7.tag name. so u can use any one for identifying it. Most probably u can use "xpath" or "css-locator" and if there r tag then link text or partial-link text. it depend on u . But we never use id's in Ajax application because it’s not possible.

(Continued on next question...)

Other Interview Questions