RE: How to handle dynamically changing element in web page?

Share me answer with example program,
waiting for u r reply.

itsivaprasad Train Asked on September 13, 2014 in Selenium WebDriver.
Add Comment
2 Answers

Hi Itsivaprasad,

If you share HTML, then we can provide you the example program and hope after seeing below methods you can do it. 🙂

Use other identifier to identify the object or use xpath, for example:

starts-with

If your dynamic element’s ids have the format where button id=”continue-12345″ where 12345 is a dynamic number you could use the following

XPath: //button[starts-with(@id, 'continue-')]

contains

Sometimes an element gets identified by a value that could be surrounded by other text, then contains function can be used.

XPath: //input[contains(@class, 'suggest')]

Vice Professor Answered on September 13, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.