Share
View previous topicGo downView next topic
Ashalina
Posts : 2
Join date : 2014-01-28

How to find a locator of an element having dynamic ID

on Wed Jan 29, 2014 12:51 am
Hello friends:

I'm new to web driver and java programming.

I have started learning webdriver using Twitter as a test application.

I'm able to open new tweet pop-up window and enter text in it's textbox, but I'm not able to locate 'Tweet' button as its xpath index changes every time a new tweet is created. Please help me to work with dynamic ids. Provide any useful website, if any.

driver.findElement(By.xpath("//button[@type='button'])[85]")).click();
The highlighted ID changes on page refresh.

Thanks,
Ashalina
View previous topicBack to topView next topic
Permissions in this forum:
You cannot reply to topics in this forum