Ranorex API with Visual Studio.

Class library usage, coding and language questions.
swarn
Posts: 1
Joined: Mon Sep 09, 2019 4:50 am

Ranorex API with Visual Studio.

Post by swarn » Mon Sep 09, 2019 5:33 am

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 ?
Attachments
RanorexForum.png
RanorexForum.png (88.05 KiB) Viewed 679 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5266
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex API with Visual Studio.

Post by odklizec » Mon Sep 09, 2019 11:51 am

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.
Pavel Kudrys
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