Does Ranorex purge resource not accessed after X minutes?
Posted: Mon Mar 09, 2015 8:21 pm
Hello,
Sorry, but I don't know how to word this very well. I noticed that when I went from Ranorex 4.0.06 to 5.2.x, I started having a lot of issues with my scripts trying to connect my main browser DOM AFTER some time had gone by. I tried to understand why, and as far as I can tell, it just seems like it forgot about it.
So what I am doing is running in VS2012 with the Ranorex API. In my code, when I connect to my browser DOM, I store the DOM in a class as a Ranorex.WebDocument object. I also store the Form that contains the DOM as a Ranorex.Form object. When I try to act upon my DOM (like click something), I always use the class variable for the DOM to find other elements off of this object. It works fine most of the time in 5.2.x BUT it Always worked in 4.0.6. When it fails in 5.2.x, I can step into my code and see that the DOM is basically dead. It knows nothing about it or its contents.
In another thread, I posted something about this in a different way, and someone suggested that the DOM must have changed and therefore I would need to re-find it. I did this and it mostly solved my problem.
BUT now I'm finding if I happen to put a breakpoint in a place right after I find it (or re-find it) and go get a coffee for about 15 minutes, when I come back and try to continue my code, it has lost the DOM object.
So I'm wondering what is going on? Someone I work with suggested maybe there was some sort or purge of Ranorex resources that are not accessed often (in a while) or some sort of garbage collection in the code. Is this possible, and if so can I disable it?
Thanks,
Aracknid.
Sorry, but I don't know how to word this very well. I noticed that when I went from Ranorex 4.0.06 to 5.2.x, I started having a lot of issues with my scripts trying to connect my main browser DOM AFTER some time had gone by. I tried to understand why, and as far as I can tell, it just seems like it forgot about it.
So what I am doing is running in VS2012 with the Ranorex API. In my code, when I connect to my browser DOM, I store the DOM in a class as a Ranorex.WebDocument object. I also store the Form that contains the DOM as a Ranorex.Form object. When I try to act upon my DOM (like click something), I always use the class variable for the DOM to find other elements off of this object. It works fine most of the time in 5.2.x BUT it Always worked in 4.0.6. When it fails in 5.2.x, I can step into my code and see that the DOM is basically dead. It knows nothing about it or its contents.
In another thread, I posted something about this in a different way, and someone suggested that the DOM must have changed and therefore I would need to re-find it. I did this and it mostly solved my problem.
BUT now I'm finding if I happen to put a breakpoint in a place right after I find it (or re-find it) and go get a coffee for about 15 minutes, when I come back and try to continue my code, it has lost the DOM object.
So I'm wondering what is going on? Someone I work with suggested maybe there was some sort or purge of Ranorex resources that are not accessed often (in a while) or some sort of garbage collection in the code. Is this possible, and if so can I disable it?
Thanks,
Aracknid.