question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select Options By is mixing value and text SelectAttribute and wrongly returns strict mode violation

See original GitHub issue

In the latest Browser version 12.0, this keyword behaves differently and thus it breaks some particular test cases.

I have the following combo box: image

and when I select with:

Select Options By .cstic-required >> text=1-channel >> xpath=..//select text 0

it returns:

waiting for selector ".cstic-required >> text=1-channel >> xpath=..//select >> nth=0 >> xpath=./option[@value="1" or text()="1"]"
  strict mode violation: ".cstic-required >> text=1-channel >> xpath=..//select >> nth=0 >> xpath=./option[@value="1" or text()="1"]" resolved to 2 elements:
    1) <option value="1">0</option> aka playwright.$("text=1-channel012 >> select")
    2) <option value="2">1</option> aka playwright.$("text=1-channel012 >> select")


If I select by value or by index, the error is the same. I don’t see any workaround for this situation currently.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
aaltatcommented, Feb 23, 2022

12.0.1 is out which should fix the problem.

0reactions
aaltatcommented, Feb 23, 2022

Indeed it was, but I am fixing it and then I will push new release out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

strict mode return this w/o violation - Stack Overflow
I want to have my cake and eat it too: I want to have a method that returns this for chaining when it...
Read more >
Browser - MarketSquare
Keywords can find elements with strict mode. If strict mode is true and locator finds multiple elements from the page, keyword will fail....
Read more >
XSL Transformations (XSLT) Version 3.0 - W3C
A mandatory select attribute, whose value is an XPath expression ... a mode of operation that takes a (possibly erroneous) stylesheet ...
Read more >
MISP/default.pot at 2.4 - GitHub
MISP considers the requested setting value as invalid and would lead to the following ... msgid "Something went wrong - could not switch...
Read more >
Bug List - Mozilla
1167, nor, P2, PC, kipp@netscape.com, VERI, FIXE, edit mode is broken ... VERI, FIXE, NGLayout uses the wrong initial value for border-color.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found