Can the recorder be made to identify a control based upon only its relative window position? We have a problem with a third party control that always changes its attributes (ControlID/role) and displays as an image that is clickable.
Thanks.
Identify control by coordinates only?
-
- Posts: 2
- Joined: Tue Apr 01, 2008 8:34 pm
- Location: Newton, MA
- Contact:
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
-
- Posts: 2
- Joined: Tue Apr 01, 2008 8:34 pm
- Location: Newton, MA
- Contact:
Identify control by coordinates only?
Apparently the control actually does change its attributes at runtime. We can see them change each time we hit the form.
I noticed that you claim that you do not record mouse moves, but only clicks. So I tried to click within the window that has the image control (that is giving us trouble), then clicking the image button. That seemed to work to the point where I could get all the way through a recording session and play it back. Is this a valid way to proceed in this case?
We have an multimedia interview application that locks out the keyboard while the interview is on-going. Only the mouse is allowed. We would like to automate testing with the recorded C# script merged with and driven by NUnit tests. Have you done this sort of thing before?
I noticed that you claim that you do not record mouse moves, but only clicks. So I tried to click within the window that has the image control (that is giving us trouble), then clicking the image button. That seemed to work to the point where I could get all the way through a recording session and play it back. Is this a valid way to proceed in this case?
We have an multimedia interview application that locks out the keyboard while the interview is on-going. Only the mouse is allowed. We would like to automate testing with the recorded C# script merged with and driven by NUnit tests. Have you done this sort of thing before?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Actually, clicking on the control should be sufficient since the RanorexRecorder activates/brings the corresponding form to front before searching for the control. But if it works that way ...JeffreyTucker wrote:Is this a valid way to proceed in this case?
We have a couple of customers using NUnit and Ranorex, and use NUnit ourselves. The one thing you might run into is setting the ApartmentState of the NUnit thread to STA. Usually, NUnit runs the testing thread with an MTA apartment state while Ranorex assumes STA (and requires STA for web automation). So, if you experience problems running you Ranorex scripts via NUnit, configure NUnit to use STA.
An instruction on how to do that can be found here:
http://www.hedgate.net/articles/2007/01 ... unit-test/
The first option is to place a config file in the same directory as you NUnit test library DLL. The second option is to create a new thread with STA in every test method calling Ranorex.
Regards,
Alex
Ranorex Support Team