lefthandedgoat / canopy

f# web automation and testing library, built on top of Selenium (friendly to c# also)
http://lefthandedgoat.github.io/canopy/
MIT License
506 stars 115 forks source link

call to fsi getting strange message #446

Closed rodsanshare closed 6 years ago

rodsanshare commented 6 years ago

Hi, It's been a while since I used fsi.exe and I'm getting the following error: I'm using vs2017 and latest chrome driver. I only have one test to see if some text is displayed, that's all.

C:\apps\KeepWarm\KeepWarm>fsi Script1.fsx
Starting ChromeDriver 2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e) on port 51389
Only local connections are allowed.
[2468:8828:0806/091309.331:ERROR:install_util.cc(589)] Unable to create registry key HKLM\SOFTWARE\Policies\Google\Chrome for reading result=2

DevTools listening on ws://127.0.0.1:51392/devtools/browser/cce60ad6-68aa-4906-b9af-be9e49ade589
[2468:8828:0806/091309.622:ERROR:gpu_process_transport_factory.cc(1017)] Lost UI shared context.

C:\apps\KeepWarm\KeepWarm>
lefthandedgoat commented 6 years ago

Is it preventing the browser from launching?

I did some quick reading and it looks like people are working around it by adding the registry key: https://github.com/SeleniumHQ/selenium/issues/5966

rodsanshare commented 6 years ago

It opens the web site, but my one test doesn't run... displayed "ASP.NET"

lefthandedgoat commented 6 years ago

Ok so it doesn't seem to be a problem with Selenium/Chrome.

You will have to share the contents of your script.

rodsanshare commented 6 years ago
#I @"c:\TestAutomation"
#r "WebDriver.dll"
#r "canopy.dll"
#r "System.Configuration"

open canopy
open OpenQA.Selenium

chromeDir<- "C:\TestAutomation\\SeleniumDrivers\\"
//Open Dev Command Prompt
//Navigate to TestAutomation and run using fsi.exe Script1.fsx
start chrome

url "https://asp.net"
displayed "ASP.NET"
quit()
lefthandedgoat commented 6 years ago

change displayed "ASP.NET" to notDisplayed "ASP.NET" and I bet it fails, meaning that it is running your code correctly.

rodsanshare commented 6 years ago

You were right, sorry for the trouble!

lefthandedgoat commented 6 years ago

No problem!