PopUpWatcher Issues
Posted: Fri Jan 15, 2016 4:56 pm
Hello all,
I have a major issue with the Ranorex PopUpWatcher class. It seems that a pop up with identical appearance and identical button, text, and title have different accessible attributes. On one page, it works fine using @title="..." in the xPath. In the other, I must use @AccessibleName="...". When I use @AccessibleName, though, the one that works with @title totally breaks. This prevents me from just making two watchers.
Once it closes the popup, the mouse interaction clicks off screen several times and never gets back on track with the test. It is somewhat difficult to describe as it is quite obscure. I have attached an image of what the report records. Even though the popup is closed successfully, it keeps detecting as if it still exists.
Here is the PopupWatcher code:
I tried to upload a snapshot but it was too large to attach.
I have a major issue with the Ranorex PopUpWatcher class. It seems that a pop up with identical appearance and identical button, text, and title have different accessible attributes. On one page, it works fine using @title="..." in the xPath. In the other, I must use @AccessibleName="...". When I use @AccessibleName, though, the one that works with @title totally breaks. This prevents me from just making two watchers.
Once it closes the popup, the mouse interaction clicks off screen several times and never gets back on track with the test. It is somewhat difficult to describe as it is quite obscure. I have attached an image of what the report records. Even though the popup is closed successfully, it keeps detecting as if it still exists.
Here is the PopupWatcher code:
Code: Select all
//Create PopUP Handler
PopupWatcher myPopupWatcher = new PopupWatcher();
//myPopupWatcher.Watch("/?/?/?/applet[@caption='oracle.forms.engine.Main']//form[@title='Restricted Information']/container[@caption~'^CAUTION:\\ \\ Some\\ member\\ dat']/element/toolbar[1]/button[@text='OK']", CloseRestrictedInformationDialog);
//myPopupWatcher.Watch("/?/?/?/applet[@caption='oracle.forms.engine.Main']//form[@accessiblename='Restricted Information']/container[@caption~'^CAUTION:\\ \\ Some\\ member\\ dat']/element/toolbar[1]/button[@text='OK']", CloseRestrictedInformationDialog);
//Data Warnings
myPopupWatcher.Watch("/dom[@domain='epsappstg.centene.com']/?/?/applet[@caption='oracle.forms.engine.Main']//form[@accessiblename='Restricted Information']/container[@caption~'^CAUTION:\\ \\ Some\\ member\\ dat']/element/toolbar[1]/button[@text='OK']",CloseRestrictedInformationDialog);
//myPopupWatcher.Watch("/dom[@domain='epsappstg.centene.com']/?/?/applet[@caption='oracle.forms.engine.Main']/?/?/container[@type='FormDesktopContainer']/form[1]/container[@caption~'^CAUTION:\\ \\ Some\\ member\\ dat']/element/toolbar[1]/button[@text='OK']",CloseRestrictedInformationDialog);
myPopupWatcher.Start();
}
public static void CloseRestrictedInformationDialog(Ranorex.Core.Repository.RepoItemInfo myInfo, Ranorex.Core.Element myElement)
{
Thread.Sleep(300);
myElement.As<Ranorex.Button>().Click();
}
public static void CloseRestrictedInformationDialog(Ranorex.Core.RxPath myPath, Ranorex.Core.Element myElement)
{
Thread.Sleep(300);
myElement.As<Ranorex.Button>().Click();
}