Compile error with PopupWatcher

Class library usage, coding and language questions.
ElkeV
Posts: 4
Joined: Wed Oct 28, 2020 10:02 am

Compile error with PopupWatcher

Post by ElkeV » Tue May 04, 2021 10:44 am

I am trying to use the popupwatcher automation helper

What I have done so far:
1. Installed the automation helpers in my solution as described in the user manual
2. Added the intended popup and its ok-button to my repository
3. Created a recording module with 2 usercode actions in it, first StartPopupWatcher(Popup,OkButton) and next StopPopupWatcher(Popup,OkButton)

When building this I get the following errors:
The call is ambiguous between the following methods or properties:
'Ranorex.AutomationHelpers.UserCodeCollections.ExceptionExtensions.GetFullMessage(System.Exception)' and
'Ranorex.AutomationHelpers.UserCodeCollections.ExceptionExtensions.GetFullMessage(System.Exception)' (CS0121)

This is my first attempt on using automation helpers, so probably I do something wrong.
Any help is appreciated.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Compile error with PopupWatcher

Post by odklizec » Wed May 05, 2021 8:50 am

Hi,

I'm not recognizing these errors. What version of Ranorex do you use? Please make sure, it's most recent 9.5.
Here is, how I'm using popupwatcher in my projects...
Popupwatcher.png
Instead of Recordings, I'm using code modules. Could you please reproduce the errors with similar approach?
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

rk325
Posts: 23
Joined: Mon Mar 27, 2023 6:02 pm

Re: Compile error with PopupWatcher

Post by rk325 » Thu Jun 08, 2023 11:30 pm

OK this is a good explanation on how to use this PopupWatcher in the Ranorex Extension Libraries.
But I have a question: I have defined my repository in C# using plain json. From there, since they are all really strings of paths, I use TryFindSingle to "instantiate" that path into a specific element, like a SpanTag, ButtonTag, etc.

However, the StartPopupWatcher method takes as input 2 RepoItemInfo. If I am using a pure json repository as I explained before, how can I create a RepoItemInfo from any specific element like a SpanTag, ButtonTag, etc. ? Or I might need to write my own version of StartPopupWatcher using RxPaths instead.

The reason I avoided using the repository element in Ranorex Studio was becasue I started using Ranorex from Visual Studio, but had to eventually return to Ranorex Studio to properly format my tests and the creation of the rxlog files, that apparently are needed to display a nice result page when running the Ranorex solution in C# thru an Azure Pipeline. Also going back to Ranorex Studio allowed me to generate the PDF files that are delivered as Artifacts on that pipeline.