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

Issue related with the positioning of rows (X path) while executing selenium script

View previous topic View next topic Go down

Issue related with the positioning of rows (X path) while executing selenium script

Post by Bindhu on Wed Sep 12, 2012 4:48 pm

I had a doubt in Selenium. It would be of great help if any one could support me in solving this issue.
The scenario is as follows:

We want to create a Contact, edit and delete the created contact. We are able to create contact but when it comes to edition and deletion we are facing some issues.

1. Create a Contact
2. Try to edit this contact, now selenium catches the X path position (//div[6]/table/tbody/tr/td[2]). No other target values are listed under the Target drop down. So when this particular contact is taken for edition, some other contact details are shown( There is some problem in the positioning of the rows)

If we create one contact, do edition or deletion it works fine but if there are more than one record, we face the above issue.

Bindhu

Posts : 5
Join date : 2012-09-12

Back to top Go down

Re: Issue related with the positioning of rows (X path) while executing selenium script

Post by sharath on Wed Sep 12, 2012 5:09 pm

Hi Bindhu,

For Xpath position you can use xpath checker Add on and check.It is more efficient.Let me know what happens after that.

Regards,
Sharath

sharath
Regular Participant
Regular Participant

Posts : 29
Join date : 2012-08-04

Back to top Go down

Re: Issue related with the positioning of rows (X path) while executing selenium script

Post by Bindhu on Wed Sep 12, 2012 5:56 pm

Thanks for the reply, tried as per your instructions but still the same error occurs saying that
[error] Element /x:html/x:body/x:div[3]/x:div[4]/x:div[3]/x:div[2]/x:div/x:div[28]/x:table/x:tbody/x:tr/x:td[2] not found.



Bindhu

Posts : 5
Join date : 2012-09-12

Back to top Go down

Re: Issue related with the positioning of rows (X path) while executing selenium script

Post by sharath on Wed Sep 12, 2012 6:04 pm

In target you have to give the command as follows

xpath=/x:html/x:body/x:div[3]/x:div[4]/x:div[3]/x:div[2]/x:div/x:div[28]/x:table/x:tbody/x:tr/x:td[2]

Please include xpath= before the xpath position .try and let me know

sharath
Regular Participant
Regular Participant

Posts : 29
Join date : 2012-08-04

Back to top Go down

Re: Issue related with the positioning of rows (X path) while executing selenium script

Post by Bindhu on Wed Sep 12, 2012 6:36 pm

Now as per you suggessted the Xpath was given. actaully this Xpath function shows a fixed path of row 2 but as we keep running the scripts, records get created so in the 2nd position maybe it is some other record so when edit is applied this record will popup for edition.
Can we give some other way like specifying the contact name for edition in the scripts.

Bindhu

Posts : 5
Join date : 2012-09-12

Back to top Go down

Re: Issue related with the positioning of rows (X path) while executing selenium script

Post by sharath on Wed Sep 12, 2012 6:51 pm

Please correct whether my understanding is right?

Yes when you add a contact you will have it as a first record.So obviously using xpath the previously first contact will come to second row and only that will get selected.So this is a dynamic table right. ???

If you want only the record which you created in the script, you can use the xpath by id.But if you delete this record you have to again script it , as the id of the new contact changes because of dynamic data.

sharath
Regular Participant
Regular Participant

Posts : 29
Join date : 2012-08-04

Back to top Go down

Re: Issue related with the positioning of rows (X path) while executing selenium script

Post by Bindhu on Wed Sep 12, 2012 7:23 pm

Your understanding is right, but here in the Xpath dropdown xpath by id is not there. This is not populating.
The contact are sorted in alphabetical order.

Bindhu

Posts : 5
Join date : 2012-09-12

Back to top Go down

Re: Issue related with the positioning of rows (X path) while executing selenium script

Post by sharath on Wed Sep 12, 2012 7:36 pm

good then if that is the case , you can use Click command and in target use Link=Contactname

Hope this helps,
Sharath Very Happy

sharath
Regular Participant
Regular Participant

Posts : 29
Join date : 2012-08-04

Back to top Go down

Re: Issue related with the positioning of rows (X path) while executing selenium script

Post by Bindhu on Wed Sep 12, 2012 7:54 pm

when you click on a particular entry, by default the Xpath is taken into consideration, so how can we change that to 'Click command and in target use Link=Contactname'. In the target dropdown only xpath is mentioned and not any name.

Bindhu

Posts : 5
Join date : 2012-09-12

Back to top Go down

Re: Issue related with the positioning of rows (X path) while executing selenium script

Post by sharath on Thu Sep 13, 2012 10:37 am

Hi Bindhu you can manually enter it. Dont use dropdown in Target when you are not using xpath. Use dropdown only in command and check.

sharath
Regular Participant
Regular Participant

Posts : 29
Join date : 2012-08-04

Back to top Go down

Re: Issue related with the positioning of rows (X path) while executing selenium script

Post by Sponsored content Today at 7:14 am


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