How to Identify Static And Dynamic Object in Selenium

Finding the location of the element is the main and important task in selenium to find out the element we need Object Identification in Selenium by the different properties.

Target/Locator
All the element present on the wave page will be identified using target or locator.Target or locator are used to identify the element present in the web page.

In selenium we can identify the object through following attribute.
id
Id is the attribute attached to the html web element
for each element the id associated with the element is different.To find a element through target or locator id is the most unique way to locate the element.
name
Name might be same for different element so to identify the element through name sometimes makes difficulty.
CSS
To identify the element through CSS we might find difficulties because of same CSS might be used in the different location in the webpage.
XPATH
XPATH is the most convenient way to locate the target or locator.Whatever the situation is we can find the element by XPATH very uniquely.
LinkText()

Partial Link Text()
Class Name()
tagname()

 

If you have any further clarification on this topic please give comment below How to Identify Static And Dynamic Object in Selenium

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *