Unable to use selectByVisibleText() on drop down menu values that contain   #1795

Open
adamlemisch opened this Issue Dec 29, 2016 · 0 comments

Projects

None yet

1 participant

@adamlemisch

The problem

When attempting to make a selection using selectByVisibleText() from a drop down menu who's values contain &nbsp's, the following error is received:

An element could not be located on the page using the given search parameters.
running chrome
Error: An element could not be located on the page using the given search parameters.
    at elementIdElement("4", "./option[normalize-space(.) = "A01 - NORTHWEST"]|./optgroup/option[normalize-space(.) = "A01 - NORTHWEST"]") - selectByVisibleText.js:33:22

Menu structure:
image

Commands attempted:
PageOnePage.area_drop_down.selectByVisibleText('A01 - NORTHWEST');
PageOnePage.area_drop_down.selectByVisibleText('A01 - NORTHWEST');

Environment

  • WebdriverIO version: ^4.5.2
  • Node.js version: v7.2.1
  • Standalone mode or wdio testrunner: wdio
  • if wdio testrunner, running synchronous or asynchronous tests: synchronous
  • Additional wdio packages used (if applicable): N/A

Please let me know if more information is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment