

usingServer( ' // use the hub that we createdĭriver.findElement(By.name( 'q')).sendKeys( 'webdriver') ĭriver.findElement(By.name( 'btnG')).click() ĭriver.wait(until.titleIs( 'webdriver - Google Search'), 1000) var webdriver = require( 'selenium-webdriver'), Now you should have a running Selenium hub with an IE node available to run your tests or scripts.Īs for the actual script, I went with WebDriverJs. To start the node, on the Windows VM in the directory where you downloaded the Selenium-Grid file, run: $ java -jar selenium-server-standalone-.jar -role node -hub You should see that a new node has been registered in the output of the hub.Īlso, navigate to localhost:4444/grid/console and you should see an IE node in the console. To start the hub, on your Mac where you placed the selenium-grid jar file from step 6, run the following command: $ java -jar selenium-server-standalone-.jar -role hub Now you’ll need to start the hub and node. Now everything is all setup and ready to go! exe file in C:\\Windows\ or a directory that’s in the Windows PATH. The file is called IEDriverServer_Win32_.zip. Pick a suitable version (I just went with the highest) and download the file selenium-server-standalone-.jarĭownload the IE driver to the Windows VM from the same folder as the Selenium-Grid jar you downloaded in the last step. To do this, run ping from the Command Prompt.ĭownload the Selenium-Grid jar to the Windows VM and your Mac from here. Once done, you can test that it’s working by pinging your Mac from the VM. You may have to restart the VM if it’s already running. To do this, change the value of Attached To: in the Network setting to Bridged Adapter. This is important because it allows the node, the VM, to connect to the hub, your Mac. Once the VM is up, you’ll have to make sure that the VM can ping your Mac. When the box is up and running, it will be available in VirtualBox. Just follow the directions in the README to download and install the box. Here are a bunch of vagrant boxes that have Windows and IE installed. The steps to getting this up and running is as follows: The Windows VM on your Mac will run a Selenium node that hooks up to the hub.Your Mac will run a Selenium-Grid hub, which is a tool for running tests on multiple machines in parallel.This post was super helpful and I borrowed a lot of content from it. In my case, I’m writing a script to help my wife automate some of her daily tasks at work. This can be useful in a number of cases like running browser automation tests for IE on your Mac. In this post I will explain how to setup Selenium WebDriver to run in IE on a Mac using Vagrant and Virtual Box.
