-
Notifications
You must be signed in to change notification settings - Fork 33
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
add visual example code #31
base: main
Are you sure you want to change the base?
Conversation
chromeOptions.AddAdditionalCapability("sauce:options", sauceOptions, true); | ||
chromeOptions.AddAdditionalCapability("sauce:visual", visualOptions, true); | ||
|
||
driver = new RemoteWebDriver(new Uri(String.Format("{0}://{1}:{2}/wd/hub", seleniumProtocol, seleniumHost, seleniumPort)), chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at this again, I think there's too many environment variables making it potentially hard to read for an end user.
Can you simplify to:
new Uri("https://hub.screener.io:443/wd/hub")
|
||
* Add all the necessary environment variables | ||
``` | ||
setx SELENIUM_PROTOCOL "http" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in another comment, let's simplify and remove the SELENIUM_PROTOCOL
, SELENIUM_HOST
, and SELENIUM_PORT
environment variables
public string sauceUserName = Environment.GetEnvironmentVariable("SAUCE_USERNAME"); | ||
public string sauceAccessKey = Environment.GetEnvironmentVariable("SAUCE_ACCESS_KEY"); | ||
public string screenerApiKey = Environment.GetEnvironmentVariable("SCREENER_API_KEY"); | ||
public string seleniumProtocol = Environment.GetEnvironmentVariable("SELENIUM_PROTOCOL"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in another comment, let's simplify and remove the SELENIUM_PROTOCOL
, SELENIUM_HOST
, and SELENIUM_PORT
environment variables and checks in this file
Nikolay, can you verify this code? I think it only works on Windows.
Also, you need to be on VPN for it to work as is.
Before merging we need to update the URL to https://hub.screener.io/wd/hub
Feel free to do whatever with this code to get it to work (move it, rewrite it, etc) :)
Let me know if I can help.