Popup Watcher cann't push button anymore
Posted: Thu Apr 30, 2020 10:44 am
Hello everyone!
I have popup Qt windows in project. I didn't change Repository items and their XPath (100% that they are correct) and PopupWatcher worked good. And now all my Qt buttons cann't be find when tests are running. Ranorex is searching... and after 1 min try to run another code (case). Of course, it isn't possible and tests are stopping as failed ! Qtversion='5.12.3'. Example of code here :
I still cann’t push buttons in PopupWatcher.
This recommendations (from forum) don't work with button element:
.CreateAdapter<Ranorex.Unknown>();
.Focus();
.Click();
.EnsureVisible();
.InvokeMethod();
I can Activate parent element (.Activate();), but buttons I still cann’t push =(
Maybe someone knows another way?
I have popup Qt windows in project. I didn't change Repository items and their XPath (100% that they are correct) and PopupWatcher worked good. And now all my Qt buttons cann't be find when tests are running. Ranorex is searching... and after 1 min try to run another code (case). Of course, it isn't possible and tests are stopping as failed ! Qtversion='5.12.3'. Example of code here :
Code: Select all
void ITestModule.Run()
{
//regular code at the beginning...
var myPopupWatcher = new PopupWatcher();
myPopupWatcher.Watch(repo.ToSaveWindow.SelfInfo, ConfirmDialog);
myPopupWatcher.Start();
Report.Info("Info", "PopupWatcher started.");
}
public static void ConfirmDialog(Ranorex.Core.Repository.RepoItemInfo repoItemInfo, Ranorex.Core.Element myElement)
{
// To save (QMessageBox) > Button Yes (QPushButton)
if (repoItemInfo==repo.ToSaveWindow.SelfInfo)
{
repo.ToSaveWindow.ButtonYes.MoveTo();
repo.ToSaveWindow.ButtonYes.Click();
Delay.Seconds(2);
}
}
This recommendations (from forum) don't work with button element:
.CreateAdapter<Ranorex.Unknown>();
.Focus();
.Click();
.EnsureVisible();
.InvokeMethod();
I can Activate parent element (.Activate();), but buttons I still cann’t push =(
Maybe someone knows another way?