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

add visual example code #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

add visual example code #31

wants to merge 1 commit into from

Conversation

titusfortner
Copy link

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.

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));

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"

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");

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

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

Successfully merging this pull request may close these issues.

2 participants