abhi111abhishek / selenium-vba

Automatically exported from code.google.com/p/selenium-vba
0 stars 0 forks source link

ChromeDriver - Selenium/VBA Error #61

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Operating system and version (64bit) : Windows Vista
Office name and version(64bit) : 2007
Browser name and version : Chrome 
SeleniumWrapper version : SeleniumWrapperSetup-1.0.17.0

Hello All,

 I'm quite new to using selenium with chrome. So please bear with me and would be greatly appreciated if someone could assist. I'm trying to open and load a page successfully; to start. It works fine but this "ChromeDriver.exe" command/application remains open and shows a number of errors(?). Can someone please advise what I'm doing wrong to prompt all these error. 

 Also as a side note the address bar first refers to a "Data:," then moves to the original google link requested; not sure why it refers to "Data:," first?

  It does what it's supposed to eventually but I'm sure these errors refer to some issue I'm doing or not doing properly to end the script. 

 Screen shot and sample code attached.

Sub Test()

Dim selenium As New SeleniumWrapper.WebDriver

With selenium
.Start "Chrome", "https://www.google.ca"
.setTimeout ("120000")
.setImplicitWait (5000)
.Open "https://www.google.ca"
End With

End Sub

Thank You !

Original issue reported on code.google.com by herbert....@gmail.com on 21 Mar 2014 at 1:56

Attachments:

GoogleCodeExporter commented 9 years ago
Do you have these errors with the last version(v1.0.18) ?

Original comment by florentbr on 21 Mar 2014 at 3:24

GoogleCodeExporter commented 9 years ago
Hello, sorry about the delayed response wasn't expecting an answer so soon 
thanks! I have yet to try version(v1.0.18). I'll see about try that now but 
other then the version is there anything wrong you can see that I'm doing, 
maybe a command I need to properly end the script or chromedriver?

Original comment by herbert....@gmail.com on 25 Mar 2014 at 10:28

GoogleCodeExporter commented 9 years ago
Hello Florent, I just tried version(v1.0.18) and same thing happens. It 
eventually does what it's supposed to but delay about 3 seconds with the error 
as per new screenshot attached and then carries on to the page.

 Like I said seems to be working I just don't know why it's showing these errors first. I want to fix whatever the issue might be now just in case it conflicts with what I'm eventually to build.

Original comment by herbert....@gmail.com on 25 Mar 2014 at 10:58

GoogleCodeExporter commented 9 years ago
On your station, Chrome is automatically updated and needs the latest web 
driver to ensure a full compatibility.
The black console window is an execution log and some errors may be irrelevant. 
All the relevant errors are displayed in a message box.
You can hide the console window with the HideCommandPromptWindow property.
Regarding your code sample, in VBA, only methods using a return value need 
brackets around parameters.
Moreover, i wouldn't recommend the use of With as the variable is sometimes 
lost while debugging.

> I'm quite new to using selenium with chrome. So please bear with me and would 
be greatly appreciated if someone could assist.
> I'm trying to open and load a page successfully; to start. It works fine but 
this "ChromeDriver.exe" command/application remains 
> open and shows a number of errors(?). Can someone please >advise what I'm 
doing wrong to prompt all these error. 
You need to call the stop command to close the browser and the console window

> Also as a side note the address bar first refers to a "Data:," then moves to 
the original google link requested;
> not sure why it refers to "Data:," first?
I don't even know why and i don't care as long as the page is loaded.

> It does what it's supposed to eventually but I'm sure these errors refer to 
some issue I'm doing or not doing properly to end the script.
The stop command is missing.

This should work on your station with the version 1.0.18 :

Dim wd As New SeleniumWrapper.WebDriver
wd.HideCommandPromptWindow = True
wd.start "chrome", "https://www.google.ca"
wd.setTimeout "120000"
wd.setImplicitWait 5000
wd.open "/"

wd.stop

Original comment by florentbr on 25 Mar 2014 at 11:39

GoogleCodeExporter commented 9 years ago
  I thank you very much for then info and your help! 

  Just 1 last thing is there a way to close said "ChromeDriver" Command Prompt so that the window stays open after the script. If I write "wd.stop" it closes the browser altogether.

Original comment by herbert....@gmail.com on 28 Mar 2014 at 12:32

GoogleCodeExporter commented 9 years ago
You can set the HideCommandPromptWindow command to true, which will hide the 
console window. Then comment or add a break point to the stop command to 
prevent the browser from closing.

Original comment by florentbr on 31 Mar 2014 at 2:49

GoogleCodeExporter commented 9 years ago

Original comment by florentbr on 2 Apr 2014 at 4:56

GoogleCodeExporter commented 9 years ago

Original comment by florentbr on 8 Sep 2014 at 5:40