.

Selenium VBA - How to run test on remote machine


In this post, we'll see how to run our tests on a remote machine using selenium VBA which is wrapper for excel.


Prerequisite

1. Selenium VB wrapper

2. Selenium standalone jar

3. 2 machines connected to same network



Steps

1. Open vba editor and include seleniumWrapper library.


2. Type this code in a new module.


Public Sub TC_Browsers()
   Dim driver As New SeleniumWrapper.WebDriver
   driver.startRemotely "firefox", "http://192.168.0.8:4444/wd/hub","http://www.google.com"
   driver.open "/"
End Sub


Do not forget to update IP of remote machine.

3. Open command prompt on remote machine and start selenium using standalone jar.

java -jar selenium-standalone.jar

4. Once it is up, run macro. It will launch firefox and open google.com on remote machine.

No comments :

Post a Comment

Recent Posts