Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

» Selenium Webdriver
Sat Feb 04, 2017 6:47 pm by soumyamishrav@gmail.com

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

XPath idwntification probkem

View previous topic View next topic Go down

XPath idwntification probkem

Post by Guest on Sat Feb 09, 2013 12:05 am

Hi All,

In the below piece of HTMl , I want to write a XPATh for node

I am trying it as //input[@id='update_data']

But No luck!!! Selenium is not finding this XPath.

Can anybody help?
-SHWETA



























Back to top Go down

Re: XPath idwntification probkem

Post by rohit kumar gupta on Sat Feb 09, 2013 1:36 am

It would be better if you paste the source code as text....Also you wanted xpath for text box or button

rohit kumar gupta
Active particpant
Active particpant

Posts : 24
Join date : 2012-09-19
Age : 27
Location : abc

Back to top Go down

Re: XPath idwntification probkem

Post by Guest on Sat Feb 09, 2013 3:42 pm

I am pasting source code as text only but somehow its converting it inHTML.
I want to click on Browse button. But somehow I am getting Xpath not identified error.
I am tring it as //input[@id='update_data']

Code:

<document>
<html>
<head>
<body>
<form id="uploaddoc" enctype="multipart/form-data" method="post" name="uploaddoc" action="fileUpload">
<div class="investment">
<div class="all-forms">
<div class="upload-content">
<div class="inside">
<div class="document-upload">
<div class="left">
<input id="update_data" class="" type="file" onchange="$(this).closest('.upload-content').find('.upload').removeClass('disabled');" name="userFile"/>
</div>
<a id="fileUploadButton" class="button small upload disabled" href="#">
</div>
<input type="hidden" name="userFileFileName"/>
<input type="hidden" name="fileIdFromServer"/>
<input id="index" type="hidden" value="1/" name="index"/>
</div>
<input class="" type="hidden" name="uploaded6"/>
</div>
</div>
</div>
</form>
</body>
</html>
</document>

Guest
Guest


Back to top Go down

Re: XPath idwntification probkem

Post by rohit kumar gupta on Sun Feb 10, 2013 5:34 pm

xpath that you are using driver.findElement(By.xpath
("//input[@id='update_data']")); looks correct. U can be assured by placing the xpath in Selenium ide and click on find button or using the firebug. There if you are able to see the button getting highlighted then it should be correct. Else try adding other properties to xpath.

rohit kumar gupta
Active particpant
Active particpant

Posts : 24
Join date : 2012-09-19
Age : 27
Location : abc

Back to top Go down

Re: XPath idwntification probkem

Post by Guest on Tue Feb 12, 2013 11:02 pm

I cant open this application in internet explorer. But otherwise I have checked it in IE developer bar by doing selectelementby click its showing this ID properly. This is not containing in any frame/iframe also. However still I am getting object identification problem.

Guest
Guest


Back to top Go down

Re: XPath idwntification probkem

Post by rohit kumar gupta on Thu Feb 14, 2013 1:33 am

Hi Shweta...
What do you mean when you can not open this application..?.and for the identification i meant you have framed xpath correctly and you can validate it using the tools i mentioned

rohit kumar gupta
Active particpant
Active particpant

Posts : 24
Join date : 2012-09-19
Age : 27
Location : abc

Back to top Go down

Re: XPath idwntification probkem

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