L
L
l0cal2012-07-20 17:43:02
HTML
l0cal, 2012-07-20 17:43:02

How to get XPATH from a page without DOM changes?

Chrome adds tbody tags around table and other table tags, htmlagilitypack ignores them. Therefore, the XPath generated by Chrome is incorrect and the HPA does not see the node. How to get XPath without extra tags?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
creage, 2012-07-21
@l0cal

Do you need to select a table with events? Why are you parsing all the way?
//table[class='newLive']//tr - will return you all table rows with the newLive class.

M
Mikhail Osher, 2012-07-20
@miraage

Just Chrome has the correct XPath.

W
Weageoo, 2012-07-20
@Weageoo

Can be .//table//trused instead.//table/tr

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question