Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension of #313 LiveHTMLReporter()... #322

Closed
sprice9161 opened this issue Jan 3, 2017 · 12 comments
Closed

Extension of #313 LiveHTMLReporter()... #322

sprice9161 opened this issue Jan 3, 2017 · 12 comments

Comments

@sprice9161
Copy link

sprice9161 commented Jan 3, 2017

Hello Chris,

This issue follows #313 LiveHTMLReporter()...

I followed what you said, downloaded the GeckoDriver.exe and defining it in my PATH. It appears that I need to install Firefox. Its an internal issue as we have recently migrated all of our servers in our environment, and I don't have the ability to download and install FF. Is there a work around to this?

Error:

An unhandled exception of type 'OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll

Additional information: Cannot find Firefox binary in PATH or default install locations. 
Make sure Firefox is installed. OS appears to be: Vista
@lefthandedgoat
Copy link
Owner

Nope you have to install the browser if you want to launch it.

You can use chrome instead if you are allowed to use that? Chrome is the best support in my opinion.

@sprice9161
Copy link
Author

sprice9161 commented Jan 3, 2017

Okay, then I'm puzzled. My code used Chrome. The call to FF is commented out. The failing line is "LiveHtmlReporter()" I didn't know if it was a function of FF.

Program.fs (snippet):

// Implement new html reporting
open reporters
reporter <- new LiveHtmlReporter() :> IReporter

#if DEBUG
//start firefox
start chrome
#else
start phantomJS
#endif

@lefthandedgoat
Copy link
Owner

@lefthandedgoat
Copy link
Owner

Before gecko driver (last few months) Firefox was the easiest way to use selenium so that was the default. Now it takes a little more work than using chrome and is less complete, so chrome is now the best default.

@sprice9161
Copy link
Author

sprice9161 commented Jan 3, 2017

I'll go look at the starter kit.....but I just commented out the two lines for the html reporter, and now I get a different error msg regarding chrome which I do have installed. The chromedriver.exe doesn't exist on my original machine, so I'm wondering if its a new requirement:

An unhandled exception of type 'OpenQA.Selenium.DriverServiceNotFoundException' occurred in WebDriver.dll

Additional information: The file c:\chromedriver.exe does not exist. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html

@lefthandedgoat
Copy link
Owner

Yes you need to have chromedriver placed at C:\ or do like canopy starter kit and put it in bin\Debug (or release) folder and change the path.

For All browsers you now need a driver which needs to be kept in sync with the browser version.

@sprice9161
Copy link
Author

I have limited access on my own machine in my new network environment.
Is the location critical or can I place it anywhere so long as I add it to my path?
I have a C:\Temp I can write to so I created "C:\Temp\Repository\QA\bin\Debug", and placed the file there. Then updated my path, restarted VS and had the same result.

@lefthandedgoat
Copy link
Owner

Do like this

https://github.com/lefthandedgoat/canopyStarterKit/blob/master/canopyStarterKit/Program.fs#L12

but use the path to the chromedriver.exe wherever you place it.

Documentation on configuration is here: http://lefthandedgoat.github.io/canopy/configuration.html

@sprice9161
Copy link
Author

sprice9161 commented Jan 4, 2017

The Program.fs in your starter kit is a bit confusing to me. I haven't sorted it out just yet. I'm assuming that the args somehow determine the browser that should be launched. The open Common isn't recognized in my project.

The solution came from the configuration page defining chromeDir, and here is why. In my new environment that we are transitioning to, I have little to no access rights to run anything. I have to explicitly "Run Elevated" to up my privileges, that's VS and everything. Placing the location in my local PATH didn't work because when I Run Elevated, it's not me running, so the local PATH is ignored. That's why chromeDir, and also the only place I can write is C:\Temp, so placing the drivers in the root wasn't an option.

You can close this issue but I might need to ask you about the program.fs file again. Should I just write you or open another ticket?

@amirrajan
Copy link
Collaborator

@sprice9161 try to use the markdown features of GH for code blocks. I've updated your comments to show how to use them.

@lefthandedgoat
Copy link
Owner

you dont need to do anything with PATH for chrome. Just set configuration.chromeDir <- "C:\Temp"

In the starter kit the arguments come from the command line.

c:\ > \path\to\exe\myTests.exe --arg1=something --arg2=somethingElse

https://github.com/lefthandedgoat/canopyStarterKit/blob/master/canopyStarterKit/canopyStarterKit.fsproj#L27

https://github.com/lefthandedgoat/canopyStarterKit/blob/master/build.fsx#L137-L139

@amirrajan
Copy link
Collaborator

Closed (no activity).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants