Hi,
I just configured a popup watcher for my action and it doesn't work.
Can you please have a look on the code below and tell me what is wrong in my config?
The popup watcher is configured as "user code" ( ClosePopupWindows() ).
public void ClosePopupWindows()
{
PopupWatcher myPopupWatcher = new PopupWatcher();
myPopupWatcher.Watch("/form[@class='SunAwtDialog']", CloseUpdateCheckDialog);
}
public static void CloseUpdateCheckDialog(Ranorex.Core.RxPath myPath, Ranorex.Core.Element myElement) {
Keyboard.Press("{Tab}");
Keyboard.Press("{Tab}");
Keyboard.Press("{Space}");
Keyboard.Press("{Return}");
}
Thanks
Popup Watcher problem
Re: Popup Watcher problem
Hi !
If you check the tutorial from the website you see this :
Therefore just add the popup element to your repository and do something like repo.mypopup.PressKeys("{Tab}")
Regards
If you check the tutorial from the website you see this :
public static void CloseUpdateCheckDialog(Ranorex.Core.RxPath myPath, Ranorex.Core.Element myElement) { myElement.As<Ranorex.Button>().Click(); }In your code you only press the keys without focusing on an element therefore I think it is working it's just that the four actions (tab, tab, space, return) are not performed on your popup.
Therefore just add the popup element to your repository and do something like repo.mypopup.PressKeys("{Tab}")
Regards
A simple thank you always does wonders !
Re: Popup Watcher problem
I tried it but still got nothing. the function never invokes (even if I'm just trying to click a button).
I am using Ranorex 4.1.2, does anyone tried to use the Popup Watcher successfully?
I am using Ranorex 4.1.2, does anyone tried to use the Popup Watcher successfully?
Re: Popup Watcher problem
Hello
I found out why it doesn't work.
You forgot to add :
I found out why it doesn't work.
You forgot to add :
// Start PopupWatcher myPopupWatcher.Start();
A simple thank you always does wonders !
Re: Popup Watcher problem
Thank you so much! ))