TinySeleniumVBA icon indicating copy to clipboard operation
TinySeleniumVBA copied to clipboard

WebDriver Start Method stopped working

Open GCuser99 opened this issue 3 years ago • 2 comments

For some unknown reason the Start method stopped working for me today. In order to fix, I had to add quotes (Chr(34)) to driverPath and that fixed it. It is strange as I am not aware of any changes to the location of driverPath before it stopped working...

If shell(Chr(34) & driverPath & Chr(34) & Port, AppWinStyle) = 0 Then

GCuser99 avatar Jan 09 '22 01:01 GCuser99

私は、driverPathに引用符 (Chr(34)) が無くても動きましたが、引用符 (Chr(34)) を付けた方が無難かもしれませんね。 I worked without the quotes (Chr (34)) in driverPath, but it might be safer to add the quotes (Chr (34)).

ghost avatar Jan 09 '22 07:01 ghost

My driver.exe path does have spaces in the directory names... Had to make the following changes to Start method:

    If Left(driverPath, 1) <> Chr(34) Then driverPath = Chr(34) & driverPath
    If Right(driverPath, 1) <> Chr(34) Then driverPath = driverPath & Chr(34)

GCuser99 avatar Jan 09 '22 21:01 GCuser99