Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Web driver not supporting xpath element ids

View previous topic View next topic Go down

Web driver not supporting xpath element ids

Post by arifm on Mon Sep 10, 2012 10:55 pm

I converted an ide script to java/web driver. But in web driver code get element by x path not supported. Please reply asap.

arifm
Active particpant
Active particpant

Posts : 12
Join date : 2012-08-08

Back to top Go down

Re: Web driver not supporting xpath element ids

Post by sreekumar on Tue Sep 11, 2012 2:22 pm

Hi arifm

Could you write the script that you did in selenium IDE. I will change the code to that support to Web driver and Xpath...

sreekumar
Active particpant
Active particpant

Posts : 16
Join date : 2011-12-27
Age : 31
Location : Hyderabad

Back to top Go down

Re: Web driver not supporting xpath element ids

Post by arifm on Tue Sep 11, 2012 3:44 pm

Sreekumar,

these are commands I used in IDE and Web driver.
In IDE it is working , but in web driver it is not working.

click //span[@id='slmTemplate']/div/div/table/tbody/tr/td- Command in IDE (x path- ID Relative)

driver.findElement(By.xpath("//span[@id='slmTemplate']/div/div/table/tbody/tr/td")).click(); Command in webdriver.

arifm
Active particpant
Active particpant

Posts : 12
Join date : 2012-08-08

Back to top Go down

Re: Web driver not supporting xpath element ids

Post by pcoulson on Wed Sep 12, 2012 12:27 am

try this:
driver.findElement(By.id("//*[@id='slmTemplate']").click();

As the span has id, it is the best to use id instead of xpath.

pcoulson

Posts : 2
Join date : 2012-09-12

Back to top Go down

Web driver

Post by arifm on Wed Sep 12, 2012 1:41 pm

pcoulson wrote:try this:
driver.findElement(By.id("//*[@id='slmTemplate']").click();

As the span has id, it is the best to use id instead of xpath.

I used this,It is not working. It is a javascript Application menu.Please suggest any other method

arifm
Active particpant
Active particpant

Posts : 12
Join date : 2012-08-08

Back to top Go down

Re: Web driver not supporting xpath element ids

Post by sreekumar on Wed Sep 12, 2012 2:58 pm

driver.findElement(By.xpath("//span[@id='slmTemplate']")).click();

I think so the above cmd should work

sreekumar
Active particpant
Active particpant

Posts : 16
Join date : 2011-12-27
Age : 31
Location : Hyderabad

Back to top Go down

Re: Web driver not supporting xpath element ids

Post by Sponsored content Today at 3:46 pm


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