Run Time error 23 - IE driver
Hi,
I am new to SeleniumBasic and got stuck at the below:
I am trying to work with IE with the below code. Sub ie() Dim wdie As WebDriver
Set wdie = New IEDriver
wdie.SetCapability "ignoreProtectedModeSettings", True
wdie.SetCapability "INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS", True
wdie.SetCapability "enableNativeEvents", True
wdie.SetCapability "ignoreZoomSettings", True
wdie.SetCapability "requireWindowFocus", True
wdie.SetCapability "IE.ensureCleanSession", True
wdie.Start "IE"
wdie.Get "https://google.ca"
wdie.Wait (5000)
wdie.FindElementByLinkText("Advanced search").Click
End Sub
It opens the IE session but does not recognize any object. It displays error: Runtime error 23 NoSuchWinowerror Window Not found. Unable to find element on closed window.
browser is opened but unable to talk to webdriver.
need help :)
Hi Paul have you checked the examples contained inside the seleniumbasic installation path?
Im pretty sure there is an example there on how to start an IE instance.
Hi Gby3...The only example I found is
Dim driver As New WebDriver() driver.Start "firefox", "http://www.google.com" driver.Get "/"
but its for Firefox.
Can you please help? I tested with Chrome, it is working fine.
Only got stuck at IE with Error 23
Try this
Public Sub Use_InternetExplorer()
Dim wdie As New IEDriver
wdie.SetCapability "ignoreProtectedModeSettings", True
wdie.SetCapability "INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS", True
wdie.SetCapability "enableNativeEvents", True
wdie.SetCapability "ignoreZoomSettings", True
wdie.SetCapability "requireWindowFocus", True
wdie.SetCapability "IE.ensureCleanSession", True
wdie.Start
wdie.Get "https://google.ca"
wdie.Wait (5000)
wdie.FindElementByLinkText("Advanced search").Click
End Sub
Hi Gby3,
I tried your code and it works on Google website but does not work on my intranet site. It is still displaying Run Time error 23.
The application I am trying to automate is on intranet site.
Thanks
Paul
it only opens the IE browser and site and the error window pops up.
Run-time error '23' NoSuchWindowError Window Not found. Unable to find element on closed window.
Looks like there is no problem recognizing the object (webdriver) as you assumed in your first post. Debug your code step by step using F8 key so you can know which line of code is making the error pop up.
as soon as browser window opens, it displays the error 23 and and then forces to End or Debug. When I click Debug, it just goes to the first line and then the same error. I am unable to debug.
I tried with VB also, but its the same.
are there any settings on IE for this intranet site which is blocking the communication between webdriver and site?
I have no experience with intranet sites. so I couldn't tell you. It is probably not a blockage, maybe you are going wrong with the reference to the site. The driver.get member is very strict in that sense, if you do not pass the address correctly it will return an error and you wont be able to access.
Yes I understand. It can access the site but not any object.
I really like SeleniumBasic but seems it is not going to work for me.
Thanks so much for trying to help.