xpath evaluation of parenthesis couple
Reported by
tareq.t...@experitest.com,
Jan 25 2017
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Steps to reproduce the problem: 1. navigate to https://datatables.net/examples/basic_init/scroll_y.html 2. xp1=(/html[1]/body[1]/div[2]/div[3]/div[1]/div[2]/div[2]/div[2]/table[1]/tbody/tr[1]/td)[count(/html[1]/body[1]/div[2]/div[3]/div[1]/div[2]/div[2]/div[2]/table[1]/thead/tr[1]/th[count(//html[1]/body[1]/div[2]/div[3]/div[1]/div[2]/div[2]/div[2]/table[1]/thead/tr[1]/th)]/preceding-sibling::*)+1] for xp1 we get single element (<td>$162,700</td>) 3. xp2=(/html[1]/body[1]/div[2]/div[3]/div[1]/div[2]/div[2]/div[2]/table[1]/tbody/tr[1]/td)[count((/html[1]/body[1]/div[2]/div[3]/div[1]/div[2]/div[2]/div[2]/table[1]/thead/tr[1]/th[count(//html[1]/body[1]/div[2]/div[3]/div[1]/div[2]/div[2]/div[2]/table[1]/thead/tr[1]/th)])/preceding-sibling::*)+1] for xp2 we get no element, xp2 has extra parenthesis couple enclosing the subset clause before the preceding-sibling 4. note that for both cases, the preceding-sibling xpath inside the count, as standalone evals to the same 5 elements What is the expected behavior? for both xpaths to get same single element What went wrong? second xpath (xp2) evals to no element Did this work before? N/A Chrome version: 55.0.2883.87 Channel: stable OS Version: 10.0 Flash Version: Shockwave Flash 24.0 r0
,
Jan 25 2017
,
Jan 25 2017
Works in latest Firefox and Edge. Doesn't work in latest Chrome canary 58 and Chrome 31.
,
Jan 27 2017
Could you elaborate a bit what you mean by 'xpl=...'? It looks like you're writing XPath; syntactically that's a regular expression with invalid flags, etc.
,
Jan 27 2017
re: #4, xp1 means XPath number one, xp2 means XPath number two. The actual expression follows the = equal sign. To reproduce simply use $x('......') in the console of that webpage with the actual expression in place of .....
,
Feb 13 2017
,
Feb 15 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 12 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by nyerramilli@chromium.org
, Jan 25 2017