New issue
Advanced search Search tips

Issue 685122 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

xpath evaluation of parenthesis couple

Reported by tareq.t...@experitest.com, Jan 25 2017

Issue description

UserAgent: 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
 
Labels: Needs-Triage-M55
Components: -Blink Blink>XML

Comment 3 by woxxom@gmail.com, Jan 25 2017

Works in latest Firefox and Edge.
Doesn't work in latest Chrome canary 58 and Chrome 31.
Labels: Needs-Feedback
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.

Comment 5 by woxxom@gmail.com, 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 .....

Comment 6 by kojii@chromium.org, Feb 13 2017

Labels: -Pri-2 Pri-3
Status: Available (was: Unconfirmed)
Project Member

Comment 7 by sheriffbot@chromium.org, Feb 15 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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
Status: Available (was: Untriaged)

Sign in to add a comment