Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
narendercb
Posts : 8
Join date : 2013-06-25

how to select  button like filed embeded in div tag in webpage using xpath Empty how to select button like filed embeded in div tag in webpage using xpath

Sat Sep 28, 2013 10:54 pm
Hi,
i have following html source taken from firebug

<div class="parent">
.
.
.
 <div class="nm" role="navigation">
  <div id=":05" class="ac">
   <div class="z0">
    <div class="abc uvw xyz" ……>doTask</div>

there is button like field in my webpage with the labeled with doTask ,i need to Click on this button

->i have tried following but didn't worked, can you please help in solving this

1.selenium.click("//div[contains(text(), 'doTask')]");
2.selenium.click("//div:contains(.,'doTask')");
3.selenium.click("//div[starts-with(@class, 'abc')]");

4.selenium.click("//div[starts-with(@class, 'abc.uvw.xyz')]");


Thanks,
Narender
avatar
narendercb
Posts : 8
Join date : 2013-06-25

how to select  button like filed embeded in div tag in webpage using xpath Empty Re: how to select button like filed embeded in div tag in webpage using xpath

Sat Sep 28, 2013 10:55 pm
This is i want to do in Selenium RC
avatar
narendercb
Posts : 8
Join date : 2013-06-25

how to select  button like filed embeded in div tag in webpage using xpath Empty Re: how to select button like filed embeded in div tag in webpage using xpath

Wed Oct 02, 2013 11:06 am
Gentle reminder
avatar
narendercb
Posts : 8
Join date : 2013-06-25

how to select  button like filed embeded in div tag in webpage using xpath Empty Re: how to select button like filed embeded in div tag in webpage using xpath

Wed Oct 02, 2013 11:40 am
i have tried getting this id from Selenium ide,but that also still not working

selenium.click(".//*[@id=':05']/div/div");

Thanks in Advance,
Narender
avatar
ravinderreddy
Posts : 6
Join date : 2012-11-10
Age : 37
Location : Hyderabad/Mumbai

how to select  button like filed embeded in div tag in webpage using xpath Empty Re: how to select button like filed embeded in div tag in webpage using xpath

Mon Dec 30, 2013 1:20 pm
try this

//div[@class='nm']//div[2]/div[contains(text(),'doTask')]
avatar
narendercb
Posts : 8
Join date : 2013-06-25

how to select  button like filed embeded in div tag in webpage using xpath Empty Re: how to select button like filed embeded in div tag in webpage using xpath

Tue Dec 31, 2013 3:15 pm
Thanks for the reply,i have able to do that using below

firebug html source small change in source from earlier i have posted

<div class="nm" role="navigation">
  <div id=":05" class="ac">
   <div class="z0">
     <strong>doTask</strong>

i have used
selenium.click("css=#:05 > div.z0 > strong");
avatar
acts79
Posts : 3
Join date : 2014-02-18
http://ny.pe

how to select  button like filed embeded in div tag in webpage using xpath Empty Re: how to select button like filed embeded in div tag in webpage using xpath

Wed Feb 19, 2014 11:54 pm
Thanks for the effort. It really helps.
Sponsored content

how to select  button like filed embeded in div tag in webpage using xpath Empty Re: how to select button like filed embeded in div tag in webpage using xpath

Back to top
Permissions in this forum:
You cannot reply to topics in this forum