Month: March 2018

Webdriver | Internet Explorer | Set Proxy Using Testmate

To launch Internet Explorer with a proxy, use the following code in Testmate: VBScript 1 2 3 4 5 6 7 8 9 10 11 12 13 14 'Initialize the options (Optional but recommended) Call wd.InitializeInternetExplorerOptions()   'Set HTTP Proxy value in the proxy object Call wd.SetHTTP_Proxy("localhost:8888")   'Set Proxy for IE Call wd.SetProxy_InternetExplorerOptions()  

Webdriver | Launch Firefox Browser Using Testmate | Proxy

The below code launch the Firefox browser using Testmate navigates the URL and performs some search operations. Webdriver needs a gecko driver to launch firefox. Setup: Make sure Geckodriver.exe file path is present in the Path system variable. Firefox Default InitializeFireFoxDriver method takes the path of gecko driver as a parameter 1 2 3 4 5

Webdriver | Launch Internet Explorer Using Testmate | VBScript

The below code launch the internet explorer ,navigates the URL and perform some search operations. The path to IE driver server is passed in the InitializeInternetExplorerOptions method. Vbscript 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15   'Initialize the options (Optional but recommended) Call wd.InitializeInternetExplorerOptions()   'Set IE

UI Automation | Advance Script With OR

The below piece of code demonstrates the usage of advance methods for UI Automation. It invokes the sample application which is provided with the tool.  This code also uses object repository which is attached in the post. Setup: Copy the below VBScript code in a text file with extension .jts In the same folder as

UI Automation | Set Root For AUT

The code below demonstrates the usage of SetRoot method for UI automation.  When a root is set, the Testmate engine accepts the newly set object as parent instead of the desktop. By doing this, the performance of the scripts can be improved as it reduces the time of object identification. 1 2 3 4 5

UI Automation | Basic Script | Calculator

Below is the sample script for automating the calculator application on Windows 10. The script launches the calculator and clicks on 2, 3 and 4 number buttons. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 'Describe the object properties oWindow = "Window,Name::Calculator" oTwo = "Window,Name::Calculator>==>Button,Name::Two"

Chapter 8 – Execution From VBScript

You can execute the Testmate scripts from VBScript in the same way as it is run using command line. Copy the following code in a .vbs file and run it. VBScript 1 2 3 4 5 'Create Shell Object using vbscript Set obj = CreateObject("Wscript.Shell")   'Run the shell command with parameters obj.Run """C:\<strong>Testmate </strong>\TesterAt.exe""   

Chapter 7 – Execution From Command Line

You can run the Testmate script from the command line by passing the test name as parameter. E.g. C:\Testmate >TesterAt.exe  c:\TestPath\Testname.jts The Execution takes place with the tool in invisible mode and results are reported in the report path configured in the config.xml.

Chapter 6 – Create a Test

Create Test 1. Launch Testmate and click on  ‘ + ’ (New) button to create a new test 2. Write the code as you would like and click on the save button 3. Save the file in .jts format. Remember the scripts can be only be saved as .jts format and libraries can only be

Chapter 5 – Object Repository

Object Repository Object Repository or as we say ‘OR’ is an XML file that contains the description of objects. The OR path has to be specified in the config file. Although you can use Notepad, it is recommended to use Microsoft XML Notepad (free to download ) to work on config file. The above OR in Notepad looks