Help
Enter a unique name for the transaction, the location of a page to load and the path to a JavaScript file containing the script to inject. You can enter a relative path or click on the + File cell to browse to the file. If a JavaScript file is not entered, the page will load without injecting a script. Click the Run button to open a web browser in a new tab and load the page. The contents of the JavaScript file will be injected into the DOM and invoked once it has loaded. The web browser used is a .NET control that utilizes Internet Explorer and the version can be changed using the combo box but requires an application restart.
Saved transaction configurations and JavaScript source code can be encrypted and decrypted if they contain sensitive information. Click the Encrypt Saved File check box to encrypt the file when saved. Use the Preview option to encrypt/decrypt JavaScript source files by clicking the Encrypt or Decrypt button. Data is protected using a password protected RSA key pair file (app.key) which is saved in the root of the application directory. If you forget the password or the file becomes corrupt you will no longer be able to decrypt files with that application key.
How It Works
Web page automations are implemented using JavaScript within a .NET WebBrowser control instantiated with the event handlers WebBrowserDocumentCompletedEventHandler and WebBrowserNavigatingEventHandler. WebBrowserDocumentCompletedEventHandler is used to trigger the script injection and exchange information with the web page. WebBrowserNavigatingEventHandler is triggered before changing the page location and is used to post back information and write text files.
The injected script is invoked with an args parameter providing the page load count and any predefined values separated by commas.
Text can be written to a file or shared between the application and web page using html elements. A div element with the id WebBrowserPostBack is used to store custom text before changing the page location. The application reads the text, concatenates it with any other text that may have been stored and injects it into the new page using the same element id once the page has loaded. Create and populate a textarea element with the id WebBrowserFileWriter before changing the page location to save custom text to a local file specified in the path attribute of the element.
Application Options
The below application options are used to reset, open, save, preview and run a transaction.
|
Provides application usage and help information. |
|
Create and change the application key password. |
|
Reset all of the field values and close the Preview tab if open. |
|
Open a saved DOM file containing the site and script values. |
|
Save all of the field values to a file for later use. |
|
Preview the JavaScript that will be injected and invoked. |
|
Create a new web browser tab, open a URL, inject and invoke the JavaScript. |
The values below are used to setup the transaction by specifying the URL, username/password and JavaScript to invoke. Multiple transactions can be executed at the same time as they use separate web browser instances running in different tabs however session cookies are shared and could cause an issue when running multiple transactions against the same site. To close a tab right-click the tab and select the Close Tab option.
Web Browser Options
By default the WebBrowser control uses Internet Explorer 7 but this can be changed by creating an application specific FEATURE_BROWSER_EMULATION registry key. The registry key and value are created or updated for the current user when changing the version using the combo box. When the application first loads a hidden WebBrowser control is created and used to display the user agent string of the selected browser.
The FEATURE_BROWSER_EMULATION feature defines the default emulation mode for Internet Explorer and supports the following values.
Value | Description |
11001 (0x2AF9) | Internet Explorer 11. Webpages are displayed in IE11 edge mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks. |
11000 (0x2AF8) | Internet Explorer 11. Webpages containing standards-based !DOCTYPE directives are displayed in IE11 edge mode. Default value for Internet Explorer 11. |
10001 (0x2711) | Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive. |
10000 (0x02710) | Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. Default value for Internet Explorer 10. |
9999 (0x270F) | Windows Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks. |
9000 (0x2328) | Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9. |
8888 (0x22B8) | Webpages are displayed in IE8 Standards mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks. |
8000 (0x1F40) | Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. Default value for Internet Explorer 8. |
7000 (0x1B58) | Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode. Default value for applications hosting the WebBrowser Control. |