Sometimes, 'click' action doesn't work

Ranorex Studio, Spy, Recorder, and Driver.
User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Sometimes, 'click' action doesn't work

Post by Support Team » Thu Sep 06, 2012 12:28 pm

Hi,

You are getting this error because you are using the elements from the original "allATags" list for the report, you should use the ATag adapter which was newly created with the saved paths, you shouldn't use the allATags list, after you saved the RxPaths to the new list, anymore.
This should work for you:
Randomize()
Dim iRandom as Integer = CInt(Int(allATags.Count * Rnd()))
Dim aTag1 As Ranorex.ATag = allPaths(iRandom)
Report.Log(ReportLevel.Info, "Mouse", "Choix de l'univers " & aTag1.InnerText, repo.LDLClyon.PiecesInfo)
         
aTag1.Click()
Regards,
Markus
Ranorex Support Team

Florian
Posts: 75
Joined: Fri Jul 27, 2012 12:57 pm
Location: France (Lyon)
Contact:

Re: Sometimes, 'click' action doesn't work

Post by Florian » Thu Sep 06, 2012 3:27 pm

Oh sorry, I forgot this last thing .... I made the change. I will tell you tomorrow if it works well or not :)
Thank you!

Florian
Posts: 75
Joined: Fri Jul 27, 2012 12:57 pm
Location: France (Lyon)
Contact:

Re: Sometimes, 'click' action doesn't work

Post by Florian » Wed Sep 19, 2012 9:53 am

It works better for sure! I still have few problems, I will work on them soon.

But now I have another problem, I do not know if this is similar or not.
In the test case, I perform a click action on a button and then a validate action to verify that the screen changed. In the Ranorex Report, I can see that the click action work, but not the validate one. The thing is that the three screenshots I get from the Report shows that the screen didn't change.
Therefore, did the click action work? How can I know that, is there any 'debug' mode where I could see every thing happening?

EDIT : Do you now if I can change the 'Target Fremework' output? Now the selected option is .NET 3.5 but on the computer I have .NET 4. Is this would help to improve performances or reduce issues?
By the way, is there a link between this target output framework and the framework used to code our website? Our websites use the .NET Framewrk 4 too.

User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Re: Sometimes, 'click' action doesn't work

Post by artur_gadomski » Thu Sep 20, 2012 8:43 am

Try to put delay between clicking a button and taking a screenshot. On some slower machines closing a window can take some time and Ranorex can take screenshots or do validation before window closes.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Sometimes, 'click' action doesn't work

Post by Support Team » Thu Sep 20, 2012 12:04 pm

Hi,

You can also set a breakpoint to the code of the click action, you find the generated code in the Recording.cs file.
If you have installed the extended version of the .Net 4.0 framework you can of course set the Target Framework to .Net 4.0, although there shouldn't be great differences.

Regards,
Markus
Ranorex Support Team