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
Bindhu
Posts : 5
Join date : 2012-09-12

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

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.
avatar
sharath
Regular Participant
Regular Participant
Posts : 29
Join date : 2012-08-04

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

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
avatar
Bindhu
Posts : 5
Join date : 2012-09-12

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

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.


avatar
sharath
Regular Participant
Regular Participant
Posts : 29
Join date : 2012-08-04

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

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
avatar
Bindhu
Posts : 5
Join date : 2012-09-12

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

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.
avatar
sharath
Regular Participant
Regular Participant
Posts : 29
Join date : 2012-08-04

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

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.
avatar
Bindhu
Posts : 5
Join date : 2012-09-12

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

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.
avatar
sharath
Regular Participant
Regular Participant
Posts : 29
Join date : 2012-08-04

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

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
avatar
Bindhu
Posts : 5
Join date : 2012-09-12

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

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.
avatar
sharath
Regular Participant
Regular Participant
Posts : 29
Join date : 2012-08-04

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

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.
Sponsored content

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

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