string progressbarPath = @"/winapp[@packagename='windows.immersivecontrolpanel']/?/?/progressbar[@automationid='SystemSettings_MusUpdate_UpdateStatus_DeterminateProgressBar']"; System.DateTime past = System.DateTime.Now.AddMinutes(60); if(WinExists(progressbarPath,10)) { Ranorex.ProgressBar progressBarItem = progressbarPath; do { Delay.Seconds(10); if(System.DateTime.Now>past) { Report.Info("Time out"); return; } }while(WinExists(progressbarPath,10)); } public static bool WinExists(string TextSearching,int Tim) { Element item; System.DateTime past=System.DateTime.Now.AddSeconds(Tim); RxPath p=new RxPath(TextSearching); do { try { item=Host.Local.FindSingle(p); if (item !=null) { return true; } else { Delay.Seconds(2); } } catch(ElementNotFoundException) { Delay.Seconds(2); } } while (System.DateTime.Now<past); return false; }
Deadlock caused by RxPath(string) method
Deadlock caused by RxPath(string) method
Below is a quote of code.It always hangs up unless I press LWin key.After debugging I found it fails at RxPath p=new RxPath(TextSearching).So I think it's bug.If the control role of "TextSearching" define in not vaild, RxPath(TextSearching) will never return.
Last edited by oliver_hl on Tue Dec 01, 2015 6:53 am, edited 1 time in total.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Deadlock caused by RxPath(string) method
Hello oliver_hl,
Unfortunately, we aren’t able to reproduce the mentioned issue on our machines.
May I ask which version of Ranorex you are currently using? If you are using an older version than Ranorex 5.4.4 I would highly recommend updating. Therefore, please remove Ranorex from your machine completely. Afterwards, reboot your machine and install the latest version of Ranorex, currently Ranorex 5.4.4.
Please let us know if the issue still occurs.
Sincerely,
Robert
Unfortunately, we aren’t able to reproduce the mentioned issue on our machines.
May I ask which version of Ranorex you are currently using? If you are using an older version than Ranorex 5.4.4 I would highly recommend updating. Therefore, please remove Ranorex from your machine completely. Afterwards, reboot your machine and install the latest version of Ranorex, currently Ranorex 5.4.4.
Please let us know if the issue still occurs.
Sincerely,
Robert
Re: Deadlock caused by RxPath(string) method
Thank you for your reply.
At the very beginning, I met this issue with Ranorex 5.4.0.So I update it to Ranorex 5.4.3, the issue is still there.
Just want to remind you, this issue is not duplicated 100%.Usually I set launch it 5 cycles, and it's easy to reproduce.Could you try this?
It happens when the prograssbar is not there where my program tries to find it.It's supposed to return false while it never returns but hangs there.
Today, I update Ranorex to 5.4.4.I still can reproduce it.Could you help on this ASAP?
At the very beginning, I met this issue with Ranorex 5.4.0.So I update it to Ranorex 5.4.3, the issue is still there.
Just want to remind you, this issue is not duplicated 100%.Usually I set launch it 5 cycles, and it's easy to reproduce.Could you try this?
It happens when the prograssbar is not there where my program tries to find it.It's supposed to return false while it never returns but hangs there.
Today, I update Ranorex to 5.4.4.I still can reproduce it.Could you help on this ASAP?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Deadlock caused by RxPath(string) method
Hello oliver_hl,
Thanks,
Robert
May I ask how I can bring up that specific progressbar on my machine?It happens when the prograssbar is not there
Thanks,
Robert
Re: Deadlock caused by RxPath(string) method
The progress bar appears after I click "Check for Updates" button.
The process like below:
1. Press "LWin+I" to launch PC Settings in Windows 10;
2. Maximize the form and Click "Update & Security" button;
3. Click "Check for Updates" button;
4. Wait for prograss bar appears to when it disappears.
You can try the code file attached.
Thanks.
The process like below:
1. Press "LWin+I" to launch PC Settings in Windows 10;
2. Maximize the form and Click "Update & Security" button;
3. Click "Check for Updates" button;
4. Wait for prograss bar appears to when it disappears.
You can try the code file attached.
Thanks.
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Deadlock caused by RxPath(string) method
Hello oliver_hl,
Thank you for providing the needed information.
Unfortunately, I was not able to reproduce mentioned behavior on our machines, even when using the provided code snippet.
Anyway, I would recommend using a WaitForExists() against the "Check for updates"-button after clicking it. Otherwise, when using your code, the progress bar disappears several times for a short period of time, even when there are updates left. In that case, your test would just continue.
Hope this information helps.
Sincerely,
Robert
Thank you for providing the needed information.
Unfortunately, I was not able to reproduce mentioned behavior on our machines, even when using the provided code snippet.
Anyway, I would recommend using a WaitForExists() against the "Check for updates"-button after clicking it. Otherwise, when using your code, the progress bar disappears several times for a short period of time, even when there are updates left. In that case, your test would just continue.
Hope this information helps.
Sincerely,
Robert
Re: Deadlock caused by RxPath(string) method
My test did not continue but just hang there for hours.That's what I concern.If progress bar disappears and my code catch it, my test is supposed to exit.Otherwise, when using your code, the progress bar disappears several times for a short period of time, even when there are updates left. In that case, your test would just continue.
It's a intermittent issue with high fail rate.What about trying more times in your site Like below?
1.Run you the test
2.Reboot
3.Run you the test
4.Reboot
....
I have done a lot of debugging in my site and my view is that RxPath function not return when the progress bar not exist during RxPath initializes the progress control.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Deadlock caused by RxPath(string) method
Hello oliver_hl,
Please excuse my late reply.
In case you are still facing the issue, please contact [email protected]
Sincerely,
Robert
Please excuse my late reply.
In case you are still facing the issue, please contact [email protected]
Sincerely,
Robert
Re: Deadlock caused by RxPath(string) method
Yes, the issue is still there. And my automation has been blocked since.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Deadlock caused by RxPath(string) method
Hello oliver_hl,
I'm afraid that we didn't receive an email from you until now. Please contact us in case you need any help.
Sincerely,
Robert
I'm afraid that we didn't receive an email from you until now. Please contact us in case you need any help.
Sincerely,
Robert