Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Selenium IDE: some assertions are broken when run through WebDriver #6118

Closed
lukeis opened this issue Mar 4, 2016 · 5 comments
Closed

Selenium IDE: some assertions are broken when run through WebDriver #6118

lukeis opened this issue Mar 4, 2016 · 5 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 6118

== Problem: ==

The assertions verifyTextPresent and verifyElementPresent do not behave as expected
when Selenium IDE is playing testcases through the WebDriver API. The assertions always
succeed, no matter if the conditions are actually met.

== Steps to reproduce the problem: ==

1) Running test cases NOT using the WebDriver API:
- Open Firefox
- Open Selenium IDE
- Make sure Options > Options > WebDriver > Enable WebDriver Playbay is UNchecked
- Open the attached testcase Selenium_IDE_wrong_assertion_testcase.html
- Run the testcase
- Result:
  - The assertions 1-3 turn green, as expected
  - The assertions 4-6 turn red, as expected

2) Running the same tests through the WebDriver API
- Make sure Options > Options > WebDriver > Enable WebDriver Playbay is checked
- Make sure the browser name in Options > Options > WebDriver is 'firefox'
- Restart Selenium IDE (required after changing the above checkbox)
- Open the attached testcase again
- Start Selenium Server Standalone
- Run the testcase again
- Result:
  - The assertions 1-3 turn green, as expected
  - The assertion 4 turns red, as expected
  - The assertions 5 (verifyTextPresent) and 6 (verifyElementPresent) turn green, even
though the expected content is nowhere on the page

== Expected behavior: ==

The test results should be identical, no matter if running through WebDriver Playback
or directly through the Firefox addon. Assertions 5 and 6 should fail.

== Additional details: ==

This is the shell output of Selenium Server when running the problematic assertions
5 and 6 (complete log is attached):

21:23:55.453 INFO - Command request: isTextPresent[Some other text, should fail, ]
on session f65cd19a-8696-45a1-8853-a84114f437cb
21:23:55.511 INFO - Got result: OK,false on session f65cd19a-8696-45a1-8853-a84114f437cb
21:23:55.526 INFO - Command request: isElementPresent[id=should-fail, ] on session
f65cd19a-8696-45a1-8853-a84114f437cb
21:23:58.079 INFO - Got result: OK,false on session f65cd19a-8696-45a1-8853-a84114f437cb

The result that is returned by the server ("false") is correct, the assertions failed
in the browser. Selenium IDE seems to handle those returned values incorrectly.

== Versions: ==
Selenium IDE 2.3.0
Firefox 23
selenium-server-standalone-2.35.0
OS: Ubuntu 12.10 (also reproducable on Windows 7)

Reported by uniqueusernamesarehardtofind on 2013-08-16 19:57:44


- _Attachment: [Selenium_IDE_wrong_assertion_testcase.html](https://storage.googleapis.com/google-code-attachments/selenium/issue-6118/comment-0/Selenium_IDE_wrong_assertion_testcase.html)_ - _Attachment: [Selenium_IDE_wrong_assertion_server_log.txt](https://storage.googleapis.com/google-code-attachments/selenium/issue-6118/comment-0/Selenium_IDE_wrong_assertion_server_log.txt)_
@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2013-08-16 22:00:12

  • Labels added: Component-IDE

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Should be fixed by rea10334997. Please wait for the next Selenium IDE release. I am
marking this as NeedsClarification until you have had a chance to verify that my fix
works.

Cheers,
Samit Badle
Selenium IDE Maintainer
Twitter: @samitbadle
Blog: http://blog.reallysimplethoughts.com/

Reported by Samit.Badle on 2013-08-17 11:23:21

  • Status changed: NeedsClarification
  • Labels removed: Status-Untriaged

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Works for me now.

Thank you for your quick response.

Reported by uniqueusernamesarehardtofind on 2013-09-11 06:28:50

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2013-09-11 07:15:40

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

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

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 4, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant