You can try the following exposed Selenium call. void runScript(String script);
Thanks, Jian On Mon, Apr 26, 2010 at 12:21 PM, yca <[email protected]> wrote: > Yes, I have tried chooseOkOnNextConfirmation(). Seems that > getConfirmation() always returns true (even if default is > chooseCancelOnNextConfirmation), so I am quite confused. > > I posted the issue on the Selenium mailing list as well but no answer > yet, you are managing better than them... ;-) > > In the meantime, could you give me some hint or page link explaining > how to invoke manually the do_confirm() function (from a Tellurium > test case?), as it would fix my problem? > > Thank you very much, > > Y. > > > > On Apr 26, 5:44 pm, Jian Fang <[email protected]> wrote: > > Tellurium exposed the following Selenium APIs in DslContext: > > > > void chooseCancelOnNextConfirmation(); > > void chooseOkOnNextConfirmation(); > > boolean isConfirmationPresent(); > > String getConfirmation(); > > > > Have you tried chooseOkOnNextConfirmation()? Personally, I haven't got a > > chance to > > try confirmation yet. If selenium doesn't work, I guess you have to do > some > > hack to manually > > invoke the do_confirm() function. > > > > Thanks, > > > > Jian > > > > > > > > On Mon, Apr 26, 2010 at 11:11 AM, yca <[email protected]> wrote: > > > I am currently using Tellurium Data-driven testing with success except > > > for one issue. Sorry if this is (also) Selenium-related but I hope > > > there is a solution in Tellurium as well. > > > > > I have an application that overrides the Confirmation Window: > > > > > if (document.getElementById) { > > > window.confirm = function(txt, confirmedAction) { > > > return createCustomConfirm(txt, confirmedAction); > > > }; > > > } > > > > > function show_confirmation() { > > > confirm('Are you sure?', do_confirm); > > > } > > > function do_confirm() { > > > // some actions here. > > > // alert("this code is executed if confirmation is true...!"); > > > } > > > > > and in my HTML: > > > <a href="#" onclick="show_confirmation()">Confirm me</a> > > > > > In the normal execution, the do_confirm is executed in the button > > > click event of my overridden Confirmation (code not shown here). > > > However, the do_confirm is NOT executed by Selenium because Selenium > > > overrides the Confirmation and returns directly from the Confirmation > > > (I am using getConfirmation in Tellurium and it returns true as > > > expected). > > > > > - Is it correct? > > > - How could I 'force' the execution of the do_confirm in case of > > > getConfirmation returning true? May I call the javascript function > > > 'do_confirm()' from within my test script after the getConfirmation > > > command (if getConfirmation returns true) or is there any another > > > solution? > > > > > Thank you, > > > > > Y. > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "tellurium-users" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<tellurium-users%[email protected]> > <tellurium-users%[email protected]<tellurium-users%[email protected]> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/tellurium-users?hl=en. > > > > -- > > You received this message because you are subscribed to the Google Groups > "tellurium-users" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > [email protected]<tellurium-users%[email protected]> > . > > For more options, visit this group athttp:// > groups.google.com/group/tellurium-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "tellurium-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<tellurium-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/tellurium-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "tellurium-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tellurium-users?hl=en.
