• You are not logged in.

#1 Dec. 15, 2014 03:49:07

Tarwad
Registered: 2014-12-15
Posts: 6
Reputation: +  0  -
Profile   Send e-mail  

XPath problem - inserting data input in ?

Dear,

I have a xPath like this
//div[@id='ui-tab-part-data-25012148']/div[2]/table/tbody/tr
.
I want to scrape a table ( as you can see).

The main problem is the number 250121148 (EAN number).

I want to use input data table to search certain EAN and scrape the table in the result.

It works if I provide manually the EAN but not when passing a EAN table input to the process to scrape quicker.

Is it possible to add a variable in the xPath like this for example :
//div[@id='ui-tab-part-data-[$EAN13.EAN13$]']/div[2]/table/tbody/tr

If you have another solution…. I am out of idea.

Thanks for your help.

Edited Tarwad (Dec. 15, 2014 03:52:49)

Offline

#2 Dec. 15, 2014 21:52:15

admin
Registered: 2012-03-15
Posts: 289
Reputation: +  1  -
Profile   Send e-mail  

XPath problem - inserting data input in ?

Yes, you can do like this. The variable and table data can in any attribute of an action: XPath, XPath Pos, Data …

Offline

#3 Dec. 18, 2014 00:48:25

Tarwad
Registered: 2014-12-15
Posts: 6
Reputation: +  0  -
Profile   Send e-mail  

XPath problem - inserting data input in ?

Ok thanks for the quick answer.

At first sight, it doesn't work.
So I used another method with relative path and text. Longer to implement but efficient.

Offline

#4 Dec. 18, 2014 01:23:14

admin
Registered: 2012-03-15
Posts: 289
Reputation: +  1  -
Profile   Send e-mail  

XPath problem - inserting data input in ?

Is the XPath you are using in a “capture” action? Other actions should be no problem.
I miss some code for this action, fixed in code, will be no problem in next version.

Offline

#5 Dec. 23, 2014 00:41:39

Tarwad
Registered: 2014-12-15
Posts: 6
Reputation: +  0  -
Profile   Send e-mail  

XPath problem - inserting data input in ?

It was in a capture event.
Ok I will have a look next version thanks.

Offline

Board footer

Moderator control

Powered by DjangoBB