On 3/13/14 1:51 AM, "Erik de Bruin" <e...@ixsoftware.nl> wrote:
>>I started porting the Mustella AS test steps to Java and ran into an
>> interesting problem: Mustella generally waits for events before
>>continuing
>> on to the next step, but I don't see any way to wait for events in
>> Selenium.
>>
>
>From what I remember, you can so something like that
>using "WebDriverEventListener" and related classes. One implementation is
>demonstrated here [1]. More examples should be available through your
>local
>Google outlet ;-)
>
>I thought about requiring that the test apps inject code into the Goog
>> events to record the last event it dispatched.  I also thought about
>> modifying Mustella so it waits for the same kinds of things that
>>Selenium
>> knows to wait for, which seems to be restricted to changes to the UI.
>>
>
>I wouldn't change Mustella and I'd rather not mess with the event system
>to
>test the even system... If you provide a use case for the type of events
>you can't get Selenium to wait for/respond to, I can hack away a bit to
>see
>if a different set of eyes maybe see a working solution.
Even in the TextButton.java example you have checked in, I see a call to
findElement.
Suppose that the element we're interested in gets created by deferred
instantiation.  Yes, you can wait for that element to appear, but more
generically, can we just wait for the "initCommplete" event from the
FlexJS application before calling findElement?  How would you code up
something like that?

Thanks,
-Alex
>

Reply via email to