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

Adding a new FireFox browser cosntructor #315

Closed
galatrash opened this issue Dec 2, 2016 · 5 comments
Closed

Adding a new FireFox browser cosntructor #315

galatrash opened this issue Dec 2, 2016 · 5 comments

Comments

@galatrash
Copy link

Please add a new FireFox constructor with option and timespan as:

| FirefoxWithProfileAndTimeSpan of Firefox.FirefoxProfile * TimeSpan

This will allow customizing startup option; such as disabling cache, etc.

@amirrajan
Copy link
Collaborator

Can you give a bit more detail on what you're trying to accomplish?

Program.fs is just a console app. So you could add a Console.ReadLine() that doesn't start the tests until you're ready to.

@galatrash
Copy link
Author

galatrash commented Dec 3, 2016

The file type.fs contains these:

//browser
type BrowserStartMode =
    | Firefox
    | FirefoxWithProfile of Firefox.FirefoxProfile
    | FirefoxWithPath of string
    | FirefoxWithUserAgent of string
    | FirefoxWithPathAndTimeSpan of string * TimeSpan
    | IE
    | IEWithOptions of IE.InternetExplorerOptions
    | IEWithOptionsAndTimeSpan of IE.InternetExplorerOptions * TimeSpan
    | EdgeBETA
...

and canopy.fs contains

    browser <-
        match b with
        | IE -> new IE.InternetExplorerDriver(ieDir) :> IWebDriver
        | IEWithOptions options -> new IE.InternetExplorerDriver(ieDir, options) :> IWebDriver
        | IEWithOptionsAndTimeSpan(options, timeSpan) -> new IE.InternetExplorerDriver(ieDir, options, timeSpan) :> IWebDriver
...
        | Firefox -> new FirefoxDriver() :> IWebDriver
        | FirefoxWithProfile profile -> new FirefoxDriver(profile) :> IWebDriver
        | FirefoxWithPath path -> new FirefoxDriver(new Firefox.FirefoxBinary(path), Firefox.FirefoxProfile()) :> IWebDriver
        | FirefoxWithUserAgent userAgent -> firefoxWithUserAgent userAgent
        | FirefoxWithPathAndTimeSpan(path, timespan) -> new FirefoxDriver(new Firefox.FirefoxBinary(path), Firefox.FirefoxProfile(), timespan) :> IWebDriver
        | Safari ->new Safari.SafariDriver() :> IWebDriver
...

What I'm asking is another option for starting firefox while specifying some options and timeout. The options will allow me to control the FireFox driver (e.g., disable caching).

@lefthandedgoat
Copy link
Owner

sure I can add it. Today I am traveling so it may be tomorrow before I create a new build

@lefthandedgoat
Copy link
Owner

You can download this change here:

https://www.nuget.org/packages/canopy/1.0.5

Thanks for the ticket!

@galatrash
Copy link
Author

That's great. Thank you.

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