Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

View previous topic View next topic Go down

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

Post by narendercb on 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

narendercb

Posts : 8
Join date : 2013-06-25

Back to top Go down

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

Post by narendercb on Sat Sep 28, 2013 10:55 pm

This is i want to do in Selenium RC

narendercb

Posts : 8
Join date : 2013-06-25

Back to top Go down

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

Post by narendercb on Wed Oct 02, 2013 11:06 am

Gentle reminder

narendercb

Posts : 8
Join date : 2013-06-25

Back to top Go down

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

Post by narendercb on 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

narendercb

Posts : 8
Join date : 2013-06-25

Back to top Go down

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

Post by ravinderreddy on Mon Dec 30, 2013 1:20 pm

try this

//div[@class='nm']//div[2]/div[contains(text(),'doTask')]

ravinderreddy

Posts : 6
Join date : 2012-11-10
Age : 30
Location : Hyderabad/Mumbai

Back to top Go down

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

Post by narendercb on 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");

narendercb

Posts : 8
Join date : 2013-06-25

Back to top Go down

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

Post by acts79 on Wed Feb 19, 2014 11:54 pm

Thanks for the effort. It really helps.

acts79

Posts : 3
Join date : 2014-02-18

http://ny.pe

Back to top Go down

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

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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