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

safe_alert() fails at UI element startup in Selenium IDE #8428

Open
lukeis opened this issue Mar 4, 2016 · 4 comments
Open

safe_alert() fails at UI element startup in Selenium IDE #8428

lukeis opened this issue Mar 4, 2016 · 4 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 8428

If you have a UI-Element definition with test case(s) (as per https://selenium.googlecode.com/git/javascript/selenium-core/scripts/ui-doc.html
> UI-Element Shorthand > testcase*), and the test case(s) fail, then Selenium IDE shows
an ugly error, but not even a hint of the failed test case(s).

UI-Element calls safe_alert() twice from UIElement's test(), once from UIElement's
init(), twice from UIMap's addPageset(), three times from UIMap's addElement(). The
only other call is in getLocator(), which should work since that's when Selenium IDE
window is already shown.

This may be caused by Firefox change in 2013 mentioned at https://forums.mozilla.org/viewtopic.php?f=7&t=14917,
or related to https://bugzilla.mozilla.org/show_bug.cgi?id=912655, or who knows....

What steps will reproduce the problem?
1. Selenium IDE > Options > Options > Selenium Core extensions > select the attached
ui_element_with_brokent_testcase.js
2. Restart Selenium IDE
3. You get an error popup: "Cannot call openModalWindow on a hidden window".

Following stack trace uses a different filename than attached, but it demonstrates
the same problem:
"openModalWindow@resource://gre/components/nsPrompter.js:356:18
ModalPrompter.prototype.openPrompt@resource://gre/components/nsPrompter.js:552:8
ModalPrompter.prototype.alert@resource://gre/components/nsPrompter.js:604:8
safe_alert@chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js:999:8
UIElement/this.test@chrome://selenium-ide/content/selenium-core/scripts/ui-element.js:225:16
UIMap/this.addElement@chrome://selenium-ide/content/selenium-core/scripts/ui-element.js:888:48
@chrome://selenium-ide/content/tools.js -> file:///home/pkehl/selite/phpmyfaq/phpmyfaq-ui_elements.js?1422309604591:16:0
@chrome://selenium-ide/content/tools.js -> file:///home/pkehl/selite/phpmyfaq/phpmyfaq-ui_elements.js?1422309604591:7:1
ExtensionsLoader.loadSubScript/<@chrome://selenium-ide/content/tools.js:206:10
ExtensionsLoader.loadSubScript@chrome://selenium-ide/content/tools.js:203:4
Editor.prototype.loadSeleniumAPI@chrome://selenium-ide/content/editor.js:1068:6
Editor@chrome://selenium-ide/content/editor.js:162:2
StandaloneEditor@chrome://selenium-ide/content/standalone-editor.js:22:4
onload@chrome://selenium-ide/content/selenium-ide.xul:1:0"

There may be similar problems elsewhere in Selenium IDE, if it uses safe_alert() before
its window is displayed.

Selenium version: 2.8.0 IDE
OS: Fedora 20
Browser: Firefox 35

Reported by peter.kehl on 2015-01-26 23:30:56


- _Attachment: [ui_element_with_brokent_testcase.js](https://storage.googleapis.com/google-code-attachments/selenium/issue-8428/comment-0/ui_element_with_brokent_testcase.js)_
@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

To streamline, I suggest you implement it together with https://code.google.com/p/selenium/issues/detail?id=8429

Reported by peter.kehl on 2015-01-26 23:50:25

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2015-02-14 21:48:42

  • Labels added: Component-IDE

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I too have noticed this.  It seems to make the testcase functionality useless, since
the user can't get meaningful insight into what failed.

Reported by ellisd23 on 2015-05-16 22:35:35

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

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

  • Labels added: Restrict-AddIssueComment-Commit

@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