What do you do when the chromedriver that matches your chrome version isn't out yet? - vba

I have a specific use case requiring me to use 'Selenium Basic' for VBA.
The versions don't match and it fails as seen in the image below:
The problem is that the chromedriver that matches the chrome installed isn't out yet.
Moreover, all other browsers except the useless I.E. have the same error, and I mean, Firefox or Opera would do of course.
Here is the error these browsers have below.
I initially believed maybe Kaspersky was at fault however its not: even off this connectivity problem persists.
I've google for exactly 65 minutes before writing this.
If you have anything of value to share, it would really help me out professionally here.
Thank you kindly,

Chromedriver version:
If you look at the official download site you will see the appropriate version is the Chrome version 89. This covers your version. FireFox is no longer supported and you would need to go back a long way to find a supported version and use the appropriate browser and driver.
I have tested the driver + browser combination which you show with python and it works as expected. The ChromeDriver 89.0.4389.23 driver should cover all 89... version Chrome browser releases to date.
InvalidArgumentException (Runtime error 0 SeleniumError Invalid Argument):
With reference to the error you saw this post gives the official documentation on it: https://stackoverflow.com/a/59067676
You are seeing this error because you have missed the protocol from your url.
Try the following:
Option Explicit
Private browser As Selenium.ChromeDriver
Public Sub login()
Set browser = New Selenium.ChromeDriver
browser.Get "https://spacequest.procurify.com"
Stop
End Sub

Related

I am trying to use webdriver in the selenium module but I keep getting an error no matter what I'm doing

As stated, I am trying to use webdriver.Chrome in this sample project I'm doing but I am completely lost on what to do. This is the error I get error. But when I look at the version of chrome I installed, it seemed to match up. Chrome Version. Does anyone know what's happening? Sorry if the post is too unspecific.
You have to update your chrome browser. Try to update the installed chrome version to latest version.
To overcome this problem, use WebDriverManager: refer - https://bonigarcia.dev/webdrivermanager/ and https://github.com/bonigarcia/webdrivermanager.
If you are using Python with selenium, refer to this post for sample code:
Chrome with WebDriver--Why is it disappearing as soon as I hit "run"? Chrome Driver version 106 but Chrome can only be 105.0.9
If you are using Java with selenium, refer to this post for sample code:
element click intercepted in Selenium wedriver

Is SeleniumBasic v2.0.9.0 still the latest version and is it compatible with Chrome/ChromeDriver Version 103.0.5060.53 (Official Build) (64-bit)?

I'm using VBA in Microsoft Access 365 and want to use it for web automation (filling web forms and getting the resulting information using variables)
I'm not 100% sure, but it looks like SeleniumBasic is installing an outdated ChromeDriver.exe? (2.21.371459)
Error Screenshot
My current version of Chrome is: Version 103.0.5060.53 (Official Build) (64-bit)
I'm reading all sorts of information about IDE's etc, and it's all a bit overwhelming! :(
To test this theory, I went ahead and replaced the ChromeDriver.exe file in C:\Program Files (x86)\SeleniumWrapper with the newer, compatible version # 102.0.5005.61
The code now throws another error
but at least it's now showing the correct driver. The error information screenshot also says that "DevToolsActivePort file does not exist". What??? How do I set that up? As I said, overwhelming.
Try using the .Start before using the .Get. Yes, this vba version of selenium hasn't had regular (or any) updates in like 8 years so it's not perfect. You have to keep your drivers up to date etc. You'll have a much better experience if you use Selenium with Python or Java.
Dim sel As New Selenium.ChromeDriver
Dim url As String
sel.Start "chrome", "http://google.com"
sel.Get "/"

Turning off w3c permanently on msedgedriver.exe

My organization, just upgraded to Version 81.0.416.53 (Official build) (64-bit) of the edge chromium browser and I am the automation engineer for it. I am having issues getting my version of Watir/Ruby to work with it I have updated the Edge Webdriver to match the version number of the browser. I was originally using the Chrome class to interact with chromium, now that no longer works, but when I switch to Edge I keep getting a w3c error when I attempt to run my ui automation scripts. There doesn't appear to be a way for me to programatically turn off the Hardware acceleration for the webdriver through the Edge class in Watir/Selenium. I have turned it off for my browser, but when I run the webdriver, it is still turned on. Is there any way for me to make this change directly in the webdriver instead of trying to change an option that doesn't exist in Watir?
I am open to other suggestions if you have them. Thank You for your time.
System:
ruby 2.5.8p224 (2020-03-31 revision 67882) [x64-mingw32]
watir(6.16.5)
selenium-webdriver (3.142.7)
Edge Chromium Version 81.0.416.53 (Official build) (64-bit)
Windows 10
Code:
require 'watir'
Selenium::WebDriver::Edge::Service.driver_path = "c:/webdriver_location/msedgedriver.exe"
client = :edge
browser = Watir::Browser.new(client)
I ran into a similar issue before. You could use the options like Chrome's in Edge Chromium. The code in ruby is like the following:
capabilities = { "edgeOptions" => {'w3c' => false} }
I'm not familiar with Watir, don't know if this syntax can be used in Watir. You could change it into the usable one in Watir.
For more detailed information, you could also refer to this thread.

What is the correct IEDriverServer version to use with IE 11 through Selenium

I just got updated to Windows 10 (x64). My old desktop had IE 11 but a lower version, as it was running Windows 7. I now have the following IE version:
Version: 11.648.17134.0
Update Versions: 11.0.115
I downloaded the latest IEDriverServer.exe that Selenium gave me (3.14). When I run it, when I do the get(url) (various urls), afterwards it fails to find elements. I looked and noticed that before the get(), driver.getWindowHandles() had one entry, but after the get() it had zero entries. This is the latest version. I tried setting compatibility mode but that did not do any good (set or not set). The tests will work fine with Chrome but someone else wrote the test and did not verify values were non-null before calling element.sendKeys(str), which IE appears to allow but Chrome throws an exception. And there are so many instances.
So, I need to find the correct IEDriverServer for my Windows 10 IE but I am having trouble doing so. Google did not give me much except it led me to the driver I already downloaded.
Can anyone help?
As a thumb-rule you can always use the released IEDriverServer from the respective released Selenium clients.
As an example,
If you are using Selenium v3.14
Download, extract and use IEDriverServer_Win32_3.14.0.zip or IEDriverServer_x64_3.14.0.zip
Snapshot:
Update
However to work with IE11 you have to take care of a couple of things which are beyond the scope of this discussion and are as follows:
How does the registry entry HKEY_LOCAL_MACHINE\…\FEATURE_BFCACHE for InternetExplorerDriver solves the Internet Explorer 11 issue?
Internet Explorer Protective mode setting and Zoom levels
Selenium InternetExplorerDriver doesn't get focus on the window
How to ignore protected Mode Settings for Internet Explorer using setCapability() through Selenium and Java?

Sending keys using Selenium and headless Chrome

Using headless chrome and selenium I can succesfully send keys to websites on my Mac. When I port the same code to my Linux machine it crashes however. The offending line is the following one:
driver.find_element_by_xpath('//input[#id="username"]').send_keys(username)
And I get the following error message:
"an X display is required for keycode conversions, consider using Xvfb"
Why is this not working on Linux?
This is a bug in chromedriver that is detailed here.
According to the new lead for chrome driver
The issue is in ChromeDriver. As its name implies, the sendKey command sends simulated key strokes to Chrome, and ChromeDriver is responsible for converting the input text string into corresponding keystrokes to send to Chrome. On Linux, ChromeDriver uses X display to do the conversion, and fails when no X display is available.
It has been fixed recently and will be released in v 2.31. Unfortunately the chromium team does not make nightly builds publicly available and there is no official release date yet.
In the meantime you can build your own chromedriver or download a prebuilt binary from a third party... Both a dockerfile and a working binary may be found at this github.