to tell you the truth dynamic elements are hard automate. especially very hard on yahoo.
there are ways to handle dynamic elements.
watch module 17th where we extract names of facebook friends. that will give you an idea how to go about it.
[attachment=2:1e95f0xr]Facebook Page.png[/attachment:1e95f0xr]Hi Ashish,
I am automating facebook page there is a text field "Create an account". Its X path is "//*[@id='content']/div/div[1]/div/div/div[2]/div[1]/div[1]/span ". Instead of X path I am using CSS selector and written CSS selector as "div[id='content'] div div[1] div div div[2] div[1] div[1] span" but its not working. In console, I am getting error of given selector is either invalid or does not result in a Web element.While if I write CSS selector as "div[class='mbs _52lq fsl fwb fcb'] span"(just above span tag I have used div tag which contains class attribute) for the same web element its working fine. So could you suggest me where I am wrong I want to write CSS selector which contains id attribute.please refer snapshot attached.
Thanks in advance.
[quote:ilv1wvsx]"div[id='content'] div div[1] div div div[2] div[1] div[1] span"[/quote:ilv1wvsx]
it will not work. because facebook has dynamic elements. so this css path will not work.