Hello Sae1962,
If you check the code in the post, then you will see that the "killexisting" flag is set to false for the open-browser action: Ranorex.Host.Local.OpenBrowser throws Win32Exception
From your post I am not sure that you have set this to false. Simply make sure that the following is considered:
1. When one iteration is finished there is a close browser at the end of that iteration.
2. The new iteration starts with a 10 sec delay or the previous one ends with a 10 sec delay.
3. Only after that the Open-Broweser action is called and the kill-existing flag is set to false.
Does it work now?
Regards,
McTurtle
Open Browser action fails when used with Clear Cache
Re: Open Browser action fails when used with Clear Cache
Hi McTurtle,
The point of delay is that the OpenBrowser action (with ENABLED KillExisting flag) does not fail with "Access is denied" message. In other words, if KillExisting is False, there is no need for adding delay before OpenBrowser action But I guess this is what Sae1962 actually wants...Open Browser action with enabled Kill Existing flag?
The point of delay is that the OpenBrowser action (with ENABLED KillExisting flag) does not fail with "Access is denied" message. In other words, if KillExisting is False, there is no need for adding delay before OpenBrowser action But I guess this is what Sae1962 actually wants...Open Browser action with enabled Kill Existing flag?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Open Browser action fails when used with Clear Cache
Is there any solution for this problem? If you are a Ranorex expert, you may access my PC to see on the premises what happens.
Re: Open Browser action fails when used with Clear Cache
Hi,
The solution is Close Browser, add delay (at least 5000ms) after Close Browser action or before Open Browser action. This workaround definitely works.
Are you using close browser as mentioned in one of my my previous posts?...
The solution is Close Browser, add delay (at least 5000ms) after Close Browser action or before Open Browser action. This workaround definitely works.
Are you using close browser as mentioned in one of my my previous posts?...
Code: Select all
Host.Current.CloseApplication(YourRepo.DomElement.Self, new Duration(0));
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Open Browser action fails when used with Clear Cache
Here is my code. Unfortunately, I do not know how to determine MyRepo at that code location. Therefore, I cannot use exactly your method call.
You do not have the required permissions to view the files attached to this post.
Re: Open Browser action fails when used with Clear Cache
You need to instantiate your repository so it will be visible in code module.
Code: Select all
using Ranorex.Core.Repository;
...
public class UserCodeCollection
{
private static ProjectName.ProjectNameRepository repo = ProjectName.ProjectNameRepository.Instance;
...
Host.Current.CloseApplication(repo.DomElement.Self, new Duration(0));
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 34
- Joined: Mon Nov 12, 2012 8:13 pm
Re: Open Browser action fails when used with Clear Cache
I am having the exact same issue now. Was a resolution found?
Ranorex 8.3.1
I am trying to find a way to execute tests without needing to run Ranorex as admin. I cannot give the access to everyone to be able to do run Ranorex as admin. If everyone runs as admin I do not have a problem.
I have all the settings and tricks mentioned in this thread and I am still getting the error.
If another user is logged in and executing tests Chrome is open and if I try to run my tests I get the error. Once those tests are done and the Chrome processes are closed then my tests work as expected.
Ranorex 8.3.1
I am trying to find a way to execute tests without needing to run Ranorex as admin. I cannot give the access to everyone to be able to do run Ranorex as admin. If everyone runs as admin I do not have a problem.
I have all the settings and tricks mentioned in this thread and I am still getting the error.
If another user is logged in and executing tests Chrome is open and if I try to run my tests I get the error. Once those tests are done and the Chrome processes are closed then my tests work as expected.
Re: Open Browser action fails when used with Clear Cache
Just to confirm your issue is the same as the one initially mentioned on this thread, are you receiving an "Access to the path 'data_0' is denied" error when trying to launch Chrome with the "Clear cache" or "Kill Existing" property set to "True"?mattmccall wrote: ↑Wed Mar 20, 2019 7:46 pmI am having the exact same issue now. Was a resolution found?
Ranorex 8.3.1
I am trying to find a way to execute tests without needing to run Ranorex as admin. I cannot give the access to everyone to be able to do run Ranorex as admin. If everyone runs as admin I do not have a problem.
I have all the settings and tricks mentioned in this thread and I am still getting the error.
If another user is logged in and executing tests Chrome is open and if I try to run my tests I get the error. Once those tests are done and the Chrome processes are closed then my tests work as expected.
If so, this can be resolved by ensuring all Chrome processes are fully closed before launching Chrome with either of these properties enabled. Even background Chrome process will cause this error. The easiest way to ensure Chrome does not remain open in the background after closing it is to disable the below option in Chrome (under "Advanced" settings).
Hope this helps!
You do not have the required permissions to view the files attached to this post.
-
- Posts: 1
- Joined: Thu Oct 24, 2019 5:28 pm
Re: Open Browser action fails when used with Clear Cache
This issue is not fixed yet. I still get the error - ESPECIALLY when the previous test fails. I have a 7 second wait time in between each test case (basically at the end of each test case in the Teardown after browser is closed). Its quite frustrating because this creates false multiple false failures that requires me to re-run the failed ones to ensure that the tests are passing - hence this is wasting a lot of time.
Any other suggestions than the ones mentioned so far in the forums?
Any other suggestions than the ones mentioned so far in the forums?
Re: Open Browser action fails when used with Clear Cache
Hi,
I’m afraid, there are no other suggestions related to this issues. And because it happens only with Chrome (Chromium-based Edge), it appears to be a problem with Chrome and not Ranorex as such? But I can be wrong A forced delay, right after killing browser and before opening new instance, definitely helps with this problem.
I’m afraid, there are no other suggestions related to this issues. And because it happens only with Chrome (Chromium-based Edge), it appears to be a problem with Chrome and not Ranorex as such? But I can be wrong A forced delay, right after killing browser and before opening new instance, definitely helps with this problem.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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