Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013517Openbravo ERPB. User interfacepublic2010-06-03 20:302010-06-03 20:30
elopio 
dbaz 
urgentminorrandom
newopen 
5
pi 
 
Core
No
0013517: Selenium requires an additional openWindow command to notice popups opened from the menu.
This is something to be added in the wishlist to facilitated integration tests with selenium.

The popups opened from the menu (Financial>Accounting>Transactions>Reset accounting, for example), are not noticed by selenium. So, the function
selenium.waitForPopUp(POPUP_NAME, PAGE_LOAD_TIMEOUT);
will fail with a time out.

There exists a workaround as it is explained in the API of the openWindow command:
This command can also be a useful workaround for bug SEL-339. In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example). In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow("", "myFunnyWindow").

So, we can select those popups calling the openWindow function. However this has proven to be unreliable, as sometimes the popup is not recognized even after calling openWindow. This behaviour is random, and happens just a few times.

As explained in http://jira.openqa.org/browse/SEL-339 [^] the problem is probably caused by opening the popup before the onload function finishes. If this is the case in openbravo, then the feature request is to explore the possibility of opening this popups after the onload function so selenium can manipulate without workarounds.

If this is not the case, the please help me to spot the cause and look for a solution.

I don't know how much work would this require, or if it's even possible. But I'm openning this issue to discuss about it.
Log in to openbravo and select a menu popup with selenium ide.

For example, this will fail:

<tr>
    <td>click</td>
    <td>//tr[4]/td/table/tbody/tr[2]/td/table/tbody/tr[5]/td/table/tbody/tr/td[2]</td>
    <td></td>
</tr>
<tr>
    <td>waitForPopUp</td>
    <td>BUTTON</td>
    <td>30000</td>
</tr>

Before the wait for waitForPopUp, and openWindow("", "BUTTON") is required.
Open the popups in a way that's easy for selenium.
No tags attached.
Issue History
2010-06-03 20:30elopioNew Issue
2010-06-03 20:30elopioAssigned To => dbaz

There are no notes attached to this issue.