selenium-google-code-issue-archive icon indicating copy to clipboard operation
selenium-google-code-issue-archive copied to clipboard

Regexp fails. Selenium Plugin for Firefox.

Open lukeis opened this issue 9 years ago • 3 comments

Originally reported on Google Code with ID 8172

Before filing an issue, please read the page at
http://code.google.com/p/selenium/wiki/SeleniumHelp This contains lot of
information about how best to get help, and tells you what we need to know.

Still here? We know that bugs are frustrating and annoying things. We also
know that you've probably spent ages trying to figure out what's wrong. The
more information you give us now, the more likely it is that we'll be able
to help.

What steps will reproduce the problem?
1. Use the selenium plugin for Firefox and start recording
2. Choose a selectable item in a multi select box. Make sure it has at least two words
with a space in between. e.g: 'test 1'
3. Save the script as a python 'WebDriver' script
4. Now run the python test script and it will fail.

What is the expected output? What do you see instead?
I expected it to select the multi select item with no problem, but instead it selects
nothing.

Selenium version: 2.41.0
OS: Debian 7
Browser: Firefox
Browser version: 31.2.0


Please provide any additional information below. A sample reduced test
case, or a public URL that demonstrates the problem will intrigue our merry
band of Open Source developers far more than nothing at all: they'll be far
more likely to look at your problem if you make it easy for them!

I have attached two files, 'test.py' and 'test1.py'. so do:

python test.py

then:

python test1.py

to see the problem. 'test.py' will fail when it tests the multi select widget at http://christopherbayliss.com.au/test/
'test1.py' will work fine. Run vimdiff, or something similar, to see what the difference
is.

Reported by christopher.j.bayliss on 2014-11-17 00:48:49


- _Attachment: [test.py](https://storage.googleapis.com/google-code-attachments/selenium/issue-8172/comment-0/test.py)_ - _Attachment: [test1.py](https://storage.googleapis.com/google-code-attachments/selenium/issue-8172/comment-0/test1.py)_

lukeis avatar Mar 04 '16 09:03 lukeis

Reported by barancev on 2014-11-17 06:33:13

  • Labels added: Component-IDE, Lang-Python

lukeis avatar Mar 04 '16 09:03 lukeis

I have just confirmed that selenium version 2.44.0 has the same problem.

======================================================================
ERROR: test_1 (__main__.Test1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Downloads/test.py", line 21, in test_1
    Select(driver.find_element_by_id("test_action")).select_by_visible_text("regexp:Test\\sProjects")
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/support/select.py",
line 136, in select_by_visible_text
    raise NoSuchElementException("Could not locate element with visible text: %s" %
text)
NoSuchElementException: Message: Could not locate element with visible text: regexp:Test\sProjects


----------------------------------------------------------------------
Ran 1 test in 40.184s

FAILED (errors=1)

Reported by christopher.j.bayliss on 2014-11-18 06:23:19

lukeis avatar Mar 04 '16 09:03 lukeis

Reported by luke.semerau on 2015-09-17 17:47:30

  • Labels added: Restrict-AddIssueComment-Commit

lukeis avatar Mar 04 '16 09:03 lukeis