Triggering onblur : Automation API

Triggering onblur

Class library usage, coding and language questions.

Triggering onblur

Postby Nicklas » Tue Jan 31, 2012 5:48 pm

On our web page we have an input field where users enters their email address. If they enter an invalid one a small icon will appear, and if they enter a valid another icon will show instead. The icon appears once the field loses focus. Here's the problem:

After Ranorex have entered an email address to the field I'm unable to trigger the onblur event. I've tried clicking on a another element on the page and I've also tried to use .Focus() on another element, but no luck. Apparently we're using jQuerys .focusout() (which should even detect .PerformClick(), right?) on the element. Does anyone have any idea why it's not working?
Nicklas
 
Posts: 15
Joined: Mon Sep 26, 2011 3:53 pm

Re: Triggering onblur

Postby Ciege » Tue Jan 31, 2012 9:14 pm

How are you having Ranorex enter text into the fields?
Are you using keyboard.press or just setting the value of the text boxes?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...
User avatar
Ciege
 
Posts: 965
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA

Re: Triggering onblur

Postby Nicklas » Tue Jan 31, 2012 10:20 pm

I'm just setting the value ...emailField.Value = myEmail
Nicklas
 
Posts: 15
Joined: Mon Sep 26, 2011 3:53 pm

Re: Triggering onblur

Postby Ciege » Tue Jan 31, 2012 10:47 pm

In that case you need to call the event yourself.

An easier method would be to have Ranorex click the textbox, then use keyboard.press to enter the text (which lets the textbox know that text is being entered) which will then trigger the event that you expect.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...
User avatar
Ciege
 
Posts: 965
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA

Re: Triggering onblur

Postby Nicklas » Wed Feb 01, 2012 9:18 am

Ok great! Thanks for the input. One question though, what do you mean by "call the event yourself"? Can I trigger the .focusout() event manually?
Nicklas
 
Posts: 15
Joined: Mon Sep 26, 2011 3:53 pm

Re: Triggering onblur

Postby Ciege » Wed Feb 01, 2012 4:18 pm

Depending on how your AUT is implemented you should be able to speak to one of your developers for how to trigger the event manually. You will need to know the proper method to call that they have implemented and what/if any parameters are needed in the call.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...
User avatar
Ciege
 
Posts: 965
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests

cron