Using Selenium Wrapper with VBA

1,032 views
Skip to first unread message

thomas alexander lawford granger

unread,
Mar 4, 2018, 9:11:51 AM3/4/18
to Selenium Users
Hi All,

I'm new to Selenium and I've been trying for the past few weeks to get VBA to automate Firefox through Selenium Wrapper.

I recorded some script in Selenium IDE and imported the code into VBA. I have the Selenium Wrapper enabled in the reference library however when I try and run the code it trips up on the first line.

The first line of code reads: 

Dim selenium As New seleniumwrapper.WebDriver
selenium.Start "firefox", "www.google.com"

VBA sits for about 30 seconds and there a message box flags up saying " Microsoft Excel is waiting for another application to complete an OLE action."

It repeats and I cannot break out of the code so I am forced to close excel using the task manager.

I've been reading up that this may be caused from some kind incompatibility between the versions of Firefox and Selenium. I am currently running Firefox version 54.0. If so can anyone recommend the correct compatible versions of Firefox and Selenium Wrapper.

I'm a bit confused with what selenium applications I need to run this code correctly not sure what version of Selenium Wrapper I have. In some reading I've been doing I seen links between what I'm trying to do and other downloads such as SeleniumBasic, SeleniumStandAloneServer, GeckoDriver but I don't know if they are necessary or how to use them.


If anyone can help I would be so grateful., as I'm out of ideas except to trigger the Selenium Macro directly from IDE using Sendkeys from VBA which I really don't want to do.

Thank you!

Tom



David

unread,
Mar 6, 2018, 3:32:51 PM3/6/18
to Selenium Users
Which Selenium VBA binding are you using? As an alternative, you could try using this instead: http://htejera.users.sourceforge.net/vbswebdriver/, which does require the standalone server JAR to use.

You could also look over the list of issues for the VBA project and file an issue there: https://github.com/florentbr/SeleniumBasic/issues
Reply all
Reply to author
Forward
0 new messages