SeleniumBasic
SeleniumBasic copied to clipboard
FireFox, Chrome, Edge, Opera Drivers are not working
I have installed SeleniumBasic-2.0.9.0.exe and did full installation. Only IE and PhantomJs drivers are working and others are not working. I have Excel 2016 64 bit and Excel 2007 32 bit running on Windows 10 64bit . Same issue on both excel versions.
I have been having problems getting mine to work for the past week or two. It just goes to a blank screen when trying to open any page in chrome. It was working fine for months before that.
Not sure about other browsers but chrome driver in the latest version of selenium Basic is outdated.
I looked into the chrome driver version and found out that it’s v 2.21while the latest version with bug fixes for chrome 54 is v 2.25.
Selenium wrapper installer comes with v 2.21 so we have to manually update the driver.
First download chrome driver 2.25 from here – https://sites.google.com/a/chromium.org/chromedriver/downloads then go to your selenium path – C:\Users\username\AppData\Local\SeleniumBasic and replace the chrome driver with the latest one and it should work fine.
I updated the chromedriver.exe file as suggested in one of the other issues posted but that alone did not fix it. I had to update my call to the driver as well:
Dim driver As SeleniumWrapper.webdriver Set driver = New SeleniumWrapper.webdriver driver.Start "chrome", "https://www.google.com" driver.Open ("https://www.google.com")
Glad it worked, I don't know how you were calling it previously. You can find more examples here -
I posted how to get Edge working. Go here.
To get Firefox working you need to downgrade to Firefox 46.0.1. Disable auto updates.
This is a great product. I would pay for it. I am hoping it is updated soon.
Thank you for the update.
Dear author, please keep this product updated and I am willing to help it by coding support / donation.
Dharmesh
On Thu, Dec 1, 2016 at 11:25 AM, mogulman52 [email protected] wrote:
I posted how to get Edge working. Go here https://github.com/florentbr/SeleniumBasic/issues/126.
To get Firefox working you need to downgrade to Firefox 46.0.1. Disable auto updates.
This is a great product. I would pay for it. I am hoping it is updated soon.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/florentbr/SeleniumBasic/issues/133#issuecomment-264219525, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtGQR4-eNjNKtVr-UtBPPMFLXBZYe0kks5rDvTfgaJpZM4K9_Rz .
--
Thanks, Dharmesh Jajal 203.526.6189
Hi,
I am getting some issue when i use my macro on one of my computer :
Firefox opens but it doesnt open the URL I gave and I get an error.
On my other computer it works perfectly.
The difference between these the computer is the Firefox version.
On the working one, FF version is 39 On the NOT working one, FF version is 49.
I read that upper FF 47 Webdriver is no more supported. The new driver is "Marionette" but I can't find how to make it work with VBA.
Have you any idea to make my automation work on my both computer ?
Here my code :
`Public Sub Mozilla()
Dim driver As New Selenium.WebDriver
Dim i As Integer, j As Integer
Dim dems As String
driver.Start Sheets("Paramètres").Range("POD_NAV")
driver.Get Sheets("Paramètres").Range("POD_URL")
driver.FindElementById("P101_USERNAME").SendKeys Sheets("Paramètres").Range("POD_LOGIN")
driver.FindElementById("P101_PASSWORD").SendKeys Sheets("Paramètres").Range("POD_PWD")
driver.FindElementById("P101_LOGIN").Click
End Sub`
You need to downgrade to FF v.46.0.1. I looked at the code in hopes of updating it but I am lost on how to change/debug it.
I dreaded this answer... so sad to donwgrade the system in order to make it work. It sounds so bad, to hear that you have to not follow the progress but look at the back. Anyway I will do it in order to make it work.
Otherwise if someone find anything, they are welcome. By the way no marionette for selenium vba ?
ChromeDriver does not work on Windows 7 x64.
Run-time error ''33' SesssionNotCreatedError session not created exception from uknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":1596.1","isDefault":true),"id":1,"name":"",....
FireFox does not work. Installed latest version 50.1.0, and get following error:
Run-time error '21': TimeoutError Firefox failed to open the listening port 127.0.0.1.:53143 within 15s Disabled Firewall, still same problem.
Please read all comments in this post. Upgrade Chrome driver and downgrade to FF 46.0.1
the "only" problem seems to be the gecko driver, isn´t it possible to handle it by adding some kind of
GeckoDriverService service =new GeckoDriverService.Builder(firefoxBinary) .usingDriverExecutable(new File("path to geckodriver")) .usingAnyFreePort() .usingAnyFreePort() .build(); service.start();
in the .....\Selenium\Drivers\FirefoxDriver.cs, as seen on (http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp) ...?!?!?
I tried this a while back. I only spent a few hours on it. I wasn't able to get NUnit tests working. I don't really understand some things so I was guessing. If I get motivated I might spend some more time on it.
` [ProgId("Selenium.FirefoxDriver")] [Guid("0277FC34-FD1B-4616-BB19-14DB1E4916D4")] [ComVisible(true), ClassInterface(ClassInterfaceType.None)] public class FirefoxDriver : WebDriver, ComInterfaces._WebDriver { const string BROWSER_NAME = "firefox";
/// <summary>
///
/// </summary>
public FirefoxDriver()
: base(BROWSER_NAME) { }
internal static IDriverService StartService(WebDriver wd)
{
ExtendCapabilities(wd, false);
var svc = new DriverService();
svc.AddArgument("--host=localhost");
svc.AddArgument("--port=" + svc.IPEndPoint.Port.ToString());
svc.Start("geckodriver.exe", true);
return svc;
}
internal static void ExtendCapabilities(WebDriver wd, bool remote)
{
Capabilities capa = wd.Capabilities;
Dictionary opts;
if (!capa.TryGetValue("firefoxOptions", out opts))
capa["firefoxOptions"] = opts = new Dictionary();
}
}
}`
Dear mogulman52 please clarify how to use your suggested code in order to handle the geckodriver.exe and where to find the geckodriver.exe?
Any update on this please? Any plans to update to handle latest FireFox ?
I am have the same problem, any idea plz
If you update the Chrome and Edge drivers it seems to work fine. SeleniumBasic installs at: C:\Users<user>\AppData\Local\SeleniumBasic
Get correct Chrome webdriver and replace it. It has to have same name. https://sites.google.com/a/chromium.org/chromedriver/downloads
Get correct Edge webdriver and replace it. You'll need to rename it. https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/#downloads
Firefox doesn't work unless you use version 46.1.0 (very old).
Dear mogulman52. The issue on FF 48+ was submitted one year ago with title: "Firefox 48+ not working with SeleniumBasic (#162)". Your reply at that time was:
"The last FF release that works with SeleniumBasic is 46.0.1. When FF switched to the new GeckoDriver it broke. I tried to adapt SB to the new FF driver but there are several things I don't understand and I wasn't successful. I haven't seen any postings from Florent Breheret so I assume he has lost interest in this product. It is a great product and I hate to see it abandoned. I'll probably try again to get it working. If I can't maybe I'll do a dll from Excel to .Net. Selenium works with C# and FF. "
Can you please give an update on this (dll or anithing else)?.
Dear mogulman52. The issue on FF 48+ was submitted one year ago with title: "Firefox 48+ not working with SeleniumBasic (#162)". Your reply at that time was:
"The last FF release that works with SeleniumBasic is 46.0.1. When FF switched to the new GeckoDriver it broke. I tried to adapt SB to the new FF driver but there are several things I don't understand and I wasn't successful. I haven't seen any postings from Florent Breheret so I assume he has lost interest in this product. It is a great product and I hate to see it abandoned. I'll probably try again to get it working. If I can't maybe I'll do a dll from Excel to .Net. Selenium works with C# and FF. "
Can you please give an update on this (dll or anithing else)?.
Do we know if there was ever a fix for using selenium basic with FF 48 or greater?
Thanks for the response and attention .. I'm looking for a tool that deals with Office software and Internet browsers The programming language is VBA
Sent from Mail for Windows 10
From: mde00435 Sent: 12 تموز, 2019 08:19 م To: florentbr/SeleniumBasic Cc: mouhammadzaheralshaar; Comment Subject: Re: [florentbr/SeleniumBasic] FireFox, Chrome, Edge, Opera Driversare not working (#133)
Dear mogulman52. The issue on FF 48+ was submitted one year ago with title: "Firefox 48+ not working with SeleniumBasic (#162)". Your reply at that time was: "The last FF release that works with SeleniumBasic is 46.0.1. When FF switched to the new GeckoDriver it broke. I tried to adapt SB to the new FF driver but there are several things I don't understand and I wasn't successful. I haven't seen any postings from Florent Breheret so I assume he has lost interest in this product. It is a great product and I hate to see it abandoned. I'll probably try again to get it working. If I can't maybe I'll do a dll from Excel to .Net. Selenium works with C# and FF. " Can you please give an update on this (dll or anithing else)?. Do we know if there was ever a fix for using selenium basic with FF 48 or greater? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
This email has been checked for viruses by AVG. https://www.avg.com
I've given up on FF. There is too much I don't understand. If I need FF I use C#. I got dragged into a big project and didn't have time. I did get SB to work with EDGE. It is a convoluted process. You start Edge, get process id and connect to Edge.
For those waiting on this issue, do you have to or must use VBA? Because there's a VBScript alternative that may be close enough for your needs (I didn't check the exact functionalities between the two though, or what bugs each may have). You might also be able to call the VBScript code from VBA too.
http://htejera.users.sourceforge.net/vbswebdriver/
and in case not, perhaps it might be easier to fix that solution for FF (and Chrome) support than this project.
Dear Mr. mougulman52,can you better explain how you connected SB to EDGE having their process id?With my regards.
Inviato da Yahoo Mail su Android
Il Lun, 15 Lug, 2019 alle 19:34, mogulman52[email protected] ha scritto:
I've given up on FF. There is too much I don't understand. If I need FF I use C#. I got dragged into a big project and didn't have time. I did get SB to work with EDGE. It is a convoluted process. You start Edge, get process id and connect to Edge.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
For those waiting on this issue, do you have to or must use VBA? Because there's a VBScript alternative that may be close enough for your needs (I didn't check the exact functionalities between the two though, or what bugs each may have). You might also be able to call the VBScript code from VBA too.
http://htejera.users.sourceforge.net/vbswebdriver/
and in case not, perhaps it might be easier to fix that solution for FF (and Chrome) support than this project.
I still need to use with VBA.
Here is how you connect to EDGE using SB. I didn't create this solution.
` Option Explicit
Public Sub Sample() Dim pid As Long Dim pno As Long: pno = 17556
pid = StartEdgeDriver(PortNo:=pno) If pid = 0 Then Exit Sub With CreateObject("Selenium.WebDriver") .StartRemotely "http://localhost:" & pno & "/", "MicrosoftEdge" .Get "https://www.bing.com/" .FindElementById("sb_form_q").SendKeys "abcdefg" MsgBox "pause", vbInformation + vbSystemModal .Quit End With TerminateEdgeDriver pid MsgBox "done.", vbInformation + vbSystemModal End Sub
Private Function StartEdgeDriver( _ Optional ByVal DriverPath As String = "C:\Windows\System32\MicrosoftWebDriver.exe", _ Optional ByVal PortNo As Long = 17556) As Long
Dim DriverFolderPath As String Dim DriverName As String Dim Options As String Dim itm As Object, itms As Object Dim pid As Long: pid = 0
With CreateObject("Scripting.FileSystemObject") If .FileExists(DriverPath) = False Then GoTo Fin DriverFolderPath = .GetParentFolderName(DriverPath) DriverName = .GetFileName(DriverPath) End With
'check already running process Set itms = CreateObject("WbemScripting.SWbemLocator").ConnectServer.ExecQuery _ ("Select * From Win32_Process Where Name = '" & DriverName & "'") If itms.Count > 0 Then For Each itm In itms pid = itm.ProcessId: GoTo Fin Next End If
'execute WebDriver Options = " --host=localhost --jwp --port=" & PortNo With CreateObject("WbemScripting.SWbemLocator").ConnectServer.Get("Win32_Process") .Create DriverPath & Options, DriverFolderPath, Null, pid End With
Fin: StartEdgeDriver = pid End Function
Private Sub TerminateEdgeDriver(ByVal ProcessId As Long) Dim itm As Object, itms As Object
Set itms = CreateObject("WbemScripting.SWbemLocator").ConnectServer.ExecQuery _ ("Select * From Win32_Process Where ProcessId = " & ProcessId & "") If itms.Count > 0 Then For Each itm In itms itm.Terminate: Exit For Next End If End Sub
`
@mogulman52 do you know if the latest versions of chrome still work with selenium basic?
I've written a whole tonne of code for Firefox in but I guess that it should work with chrome with a few small mods.
The issue I'm having with Firefox is i'm automating listing items on eBay; however when I want to save the listing Firefox crashes with an 'unresponsive script' message. Is this symptomatic of the outdated browser or is this something else?
I can confirm that all my SeleniumBasic code, which goes back 3 to 4 years, still runs perfectly fine in my version of Chrome (75.0.3770.142) which is not the absolute latest. Occasionally I had some unexpected issues in the past in code that was working fine before. That usually happened after a new version of Chrome was released but to fix it, I just downloaded the latest ChromeDriver and overwrite the old version in the SeleniumBasic installation directory and all was well again. Also check out the ChromeDriver download page for recommended version against each new Chrome release. https://sites.google.com/a/chromium.org/chromedriver/downloads
Dear mr. Mogulman, your SeleniumBasic works fine for Chrome, Edge and Opera too, including the latest versions of these web browsers. But Firefox doesn't works with the geckodriver.exe available on web for the recent releases of this browser (after release 69 I guess). Could you please update us on the status of code implementing Firefox latest release?