selenium-google-code-issue-archive
selenium-google-code-issue-archive copied to clipboard
Selenium IDE exports extra characters with Python WebDriver when using the 'verifyText' command on text containing a question mark
Originally reported on Google Code with ID 7773
*** What steps will reproduce the problem? ***
1. From the Selenium IDE, right-click on a webUI text that contains a question mark
(?) and select the verifyText option so it shows up in the IDE.
2. Export the test case as 'Python 2 / unittest / WebDriver' and name it myFile.py
3. Open this file up in an editor and analyze the assert command that's a result of
the 'verifytext' command from the IDE.
*** What is the expected output? What do you see instead? ***
I'd expect the assert statement to contain the text in question exactly as it appear
in the IDE. Instead, any place that should have a question mark for the text comparison
contains these characters instead: [\s\S]$
Selenium version: IDE 2.5.0
OS: Windows 7 Professional 64-bit SP1
Browser: Firefox
Browser version: 30.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!
1. Visit the following webpage: http://storycorps.org/great-questions/
2. Run the Selenium IDE
3. Right-click on one of the questions in the web page that contains a question mark
(i.e. Who has been the most important person in your life? Can you tell me about him
or her?). Select the 'verifyText' option. It should appear something like this in
the IDE:
>>>> verifyText || css=div.content ul li || exact:Who has been the most important person
in your life? Can you tell me about him or her?
4. Export the test case, via Python / unittest / WebDriver. Save it myFile.py.
5. Open this file in an editor and analyze the assert statement that represents the
'verifyText' part in the IDE. You'll see something like this:
>>>> try: self.assertRegexpMatches(driver.find_element_by_css_selector("div.content
> ul > li").text, r"^exact:Who has been the most important person in your life[\s\S]
Can you tell me about him or her[\s\S]$")
As you can see, there is a collection of other characters where there should be question
marks.
Reported by byrd.of.prey on 2014-08-20 16:35:47
- _Attachment: [myFile.html](https://storage.googleapis.com/google-code-attachments/selenium/issue-7773/comment-0/myFile.html)_ - _Attachment: [myFile.py](https://storage.googleapis.com/google-code-attachments/selenium/issue-7773/comment-0/myFile.py)_
Reported by barancev on 2014-08-20 20:35:24
- Labels added: Component-IDE, Lang-Python
Reported by Samit.Badle on 2014-09-16 06:57:27
- Status changed:
Accepted
Reported by luke.semerau on 2015-09-17 17:47:04
- Labels added: Restrict-AddIssueComment-Commit