Modify or Update Global Settings through code modules

Ask general questions here.
Nagarjuna
Posts: 14
Joined: Fri Sep 26, 2014 6:23 am

Modify or Update Global Settings through code modules

Post by Nagarjuna » Mon Dec 22, 2014 1:38 pm

Hi,

I want to update or modify few global settings using code modules.

Ex : Settings > General > Check Box - Use Ensure Visible by default (Checked using User Interface)

But i want to un check this for some operations which need Use Ensure Visible by default to un cheked.

Please let me know if is there any way to update the global setting other than updating from Settings User Interface ?

Thanks,
Nagarjuna

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Modify or Update Global Settings through code modules

Post by Support Team » Tue Dec 23, 2014 10:25 am

Hello Nagarjuna,

You can use following line of code in order to change the default setting of "EnsureVisible":

Code: Select all

Configuration.Current.Adapter.DefaultUseEnsureVisible = true/false;
Regards,
Robert
.
Image

Nagarjuna
Posts: 14
Joined: Fri Sep 26, 2014 6:23 am

Re: Modify or Update Global Settings through code modules

Post by Nagarjuna » Tue Dec 23, 2014 10:50 am

Hi Robert,

Thank you so much for quick reply.

It is working fine for the Ensure Visible default settings.

I want to update few more settings of Imaging etc. while run time. Is there any document with mapping of each setting in Global Settings User Interface to updating from code?

Thanks,
Nagarjuna

keith
Posts: 14
Joined: Thu Nov 27, 2014 2:07 pm

Re: Modify or Update Global Settings through code modules

Post by keith » Tue Dec 23, 2014 12:26 pm

You can find them directly while typing in Ranorex studio.

when typing in user code ...

Code: Select all

  Configuration.Current.Adapter.
and when you type the dot you can see the following...
DefaultSearchTimeout
DefaultUseEnsureVisible
TimeoutFactor


or you can just look in the API documentation http://www.ranorex.com/Documentation/Ranorex/ and search for what you want.

To answer your specific question just look under

Configuration.AdapterConfig Class
Namespaces ► Ranorex.Core ► Configuration ► Configuration.AdapterConfig
Cheers,
keith