Commands for Editing the Browser Properties

List of commands for editing the browser properties:

SETAMBIENTPROPERTIES

Establishes the properties that control the elements that the active browser downloads and executes.

Parameters

SetAmbientProperties(images, videos, bgSounds, noScripts, noJava,
noActiveX, noVisualization, noCache, noProxyCache [, noRunActivex,
noBehaviors ] )

All the parameters can take the value 0 (indicates a negative value) or 1 (indicates a positive value).

  • int images: download images.

  • int videos: download videos.

  • int bgSounds: download sounds.

  • int noScript: do not execute scripts.

  • int noJava: do not execute applets.

  • int noActiveX: do not download ActiveX controls.

  • int noVisualization: the page is downloaded but not viewed.

  • int noCache: the cache files are ignored and are requested from the server. If this indicates that the cached files are up to date, they are used.

  • int noProxyCache: the request is forced through the server, ignoring the cache of the proxy, even if it contains the data used.

  • int noRunActiveX: optional. ActiveX controls are not executed.

  • int noBehaviors: optional. Behaviors are not downloaded and are disabled in the document.

Returns

Nothing.

Note

When using MSIE Browser this command will only have effect if it is executed before the browser performs any navigation. After that, the setAmbientProperties command will be ignored.

SETPROXYAUTHINFO

Allows the active browser to be configured with preferences to browse through authenticated proxies. The system finds a proxy authentication window and automatically completes its fields, where necessary.

Parameters

  • String login: user name in the proxy. Some web proxies require the name of the domain to be specified together with the login using the format domain\login or domain/login (in these cases the parameter domain must be left empty).

  • String password: password in the proxy. The value of this parameter can be encrypted, using the prefix encrypted: (for example encrypted:/QBQilPalsqjQpGOj4Ek8Q==). To obtain the encrypted value, the Generation Toolbar can be used to record the command, or the encryption facilities of the Sequence Editor in the Wrapper Generator Tool can be used to encrypt a clear value.

  • String domain: domain in the proxy.

Returns

(boolean): true if the command is successful, otherwise false.

Important

The symbols @ and \ must be escaped with \@ and \\\\.

Note

The proxy settings are different if you are using MSIE Browser or Denodo Browser, and if the proxy needs authentication or not:

  • Consider this if you are using Microsoft Internet Explorer:

    • The proxy settings (host and port) must be configured in the settings dialog of the browser (not from the Denodo options). To access it, open the Connections tab of the Tools > Internet Options dialog of Microsoft Internet Explorer. You can configure the proxy using the LAN settings button.

      If the MSIE browser is not properly configured to browse through the proxy, ITPilot will ignore the setProxyAuthInfo command.

      Please notice that this will configure all the wrappers to use the proxy for the browsing, because it is configured in the browser. If you need to use it only for one wrapper, the use of Denodo Browser is recommended if possible (see below).

    • If the proxy is authenticated, the login/password/domain settings can be filled either in the Options dialog of the Denodo toolbar or manually adding a setProxyAuthInfo command to the sequence.

  • Consider this if you are using Denodo Browser:

    • Denodo Browser does not acknowledge the settings of MSIE Browser, but accepts a format in the setProxyAuthInfo command that includes the host and port. Use the following syntax:

      proxy requires authentication
      SetProxyAuthInfo(user\\@host:port,passwd,_NULL_)
      

      or this:

      proxy does not require authentication
      SetProxyAuthInfo(host:port,_NULL_,_NULL_)
      

      For example, for a proxy that requires authentication, enter this

      setProxyAuthInfo(demo-user\\@proxy.acme.com:80, mypassword, mydomain)
      

This command supports these HTTP authentication methods: HTTP Basic, HTTP Digest and NTLM.

Examples

Tries HTTP Digest first and if it fails, it uses HTTP Basic
SetProxyAuthInfo (user,password,)
Tries NTLM first and if it fails, it uses HTTP Digest
SetProxyAuthInfo(user,password,WORKGROUP);

The authentication method can be specified manually:

SetProxyAuthInfo(user,password,<method>:<DOMAIN>);

Where <method> can be “BASIC”, “DIGEST” or “NTLM”. For example:

SetProxyAuthInfo(user,password,NTLM:WORKGROUP);

SETUSERAGENT

Allows to set the value of the header User-Agent sent by the browser during the current session.

Parameters

  • String useragent: the value to be sent in the User-Agent header. The value _NULL_ can be used to restore the default user agent value of the browser.