Hiya
We have some problems while debugging in visual studio
If you set a breakpoint, and then start stepping through the code, all Ranorex statements fail
because VS is On Top and not the AUT.
It seems such a simple problem, but I cant think of how to get around it (other than having two monitors!)
Is there a way to get Visual to minimise when you debug, so the AUT can be seen ?
Thanks
Clayton
Debugging in Visual Studio
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Debugging in Visual Studio
If you use Ranorex adapters and set the Adapter.DefaultUseEnsureVisible property to true, Ranorex will automatically try to bring the corresponding UI to the foreground (e.g. when you invoke Adapter.Click or Adapter.MoveTo). This is not true if you work directly with Element objects:
Alex
Ranorex Support Team
Button button = "pathToMyButton"; // if you step through this code, Ranorex tries to bring the button to the foreground button.Click(); // if you work directly with Element instances, Ranorex won't call EnsureVisible Element buttonElement = button.Element; buttonElement.Click(); // fails if you step through with debuggerRegards,
Alex
Ranorex Support Team
Re: Debugging in Visual Studio
Ok, so
Adapter.DefaultUseEnsureVisible is applied globally
But a the instance property is used only for an adapter instance?
Adapter.DefaultUseEnsureVisible is applied globally
But a the instance property is used only for an adapter instance?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Debugging in Visual Studio
The value of Adapter.DefaultUseEnsureVisible is applied for instances that have the Adapter.UseEnsureVisible property set to null. I.e. for every instance set Adapter.UseEnsureVisible to true or false to tell Ranorex to use EnsureVisible or not, respectively, or set it to null to use the value of DefaultUseEnsureVisible.
Regards,
Alex
Ranorex Support Team
Regards,
Alex
Ranorex Support Team