Page 1 of 1
Ranorex API with Visual Studio.
Posted: Mon Sep 09, 2019 5:33 am
by swarn
Hi,
I am using Ranorex API with VS 2019.
When I try to search for an element through Ranorex API using Visual Studio , it fails to recognize it whereas the same element works in Ranorex Studio.
Any help please ?
Re: Ranorex API with Visual Studio.
Posted: Mon Sep 09, 2019 11:51 am
by odklizec
Hi,
Does the VS code fails immediately after accessing the line of code with given path? The thing is, that in Ranorex, any action involving repository element, always waits certain amount of time (Effective Timeout) before throwing "Element not found" exception. I'm not using VS integration, so I can only guess that there is no such mechanism available (out of the box) in VS code, so you must implement something similar (some kind of "waitforelementexists" mechanism) in VS code? I would suggest to use FindSingle with defined timeout (e.g. 30s) and only if element is found, apply Create code with found element.