Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dca5756

Browse files
committedJun 4, 2021
Update .NET test to properly use remote/grid
1 parent b754461 commit dca5756

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed
 
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using OpenQA.Selenium.Chrome;
2+
using OpenQA.Selenium.Remote;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace OpenQA.Selenium.Remote
9+
{
10+
public class StableChannelRemoteChromeDriver : RemoteWebDriver
11+
{
12+
public StableChannelRemoteChromeDriver()
13+
: base(new Uri("http://127.0.0.1:6000/wd/hub/"), new ChromeOptions())
14+
{
15+
this.FileDetector = new LocalFileDetector();
16+
}
17+
}
18+
}

‎dotnet/test/common/Environment/RemoteSeleniumServer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace OpenQA.Selenium.Environment
88
public class RemoteSeleniumServer
99
{
1010
private Process webserverProcess;
11-
private string serverJarName = @"buck-out/gen/java/server/src/org/openqa/grid/selenium/selenium.jar";
11+
private string serverJarName = @"java/server/src/org/openqa/selenium/grid/selenium_server_deploy.jar";
1212
private string projectRootPath;
1313
private bool autoStart;
1414

@@ -41,14 +41,14 @@ public void Start()
4141
string ieDriverExe = System.IO.Path.Combine(serviceDirectory, "IEDriverServer.exe");
4242
string chromeDriverExe = System.IO.Path.Combine(serviceDirectory, "chromedriver.exe");
4343
string geckoDriverExe = System.IO.Path.Combine(serviceDirectory, "geckodriver.exe");
44-
string edgeDriverExe = System.IO.Path.Combine(serviceDirectory, "MicrosoftWebDriver.exe");
44+
string edgeDriverExe = System.IO.Path.Combine(serviceDirectory, "msedgedriver.exe");
4545
webserverProcess = new Process();
4646
webserverProcess.StartInfo.FileName = "java.exe";
4747
webserverProcess.StartInfo.Arguments = "-Dwebdriver.ie.driver=" + ieDriverExe
4848
+ " -Dwebdriver.gecko.driver=" + geckoDriverExe
4949
+ " -Dwebdriver.chrome.driver=" + chromeDriverExe
5050
+ " -Dwebdriver.edge.driver=" + edgeDriverExe
51-
+ " -jar " + serverJarName + " -port 6000";
51+
+ " -jar " + serverJarName + " standalone --port 6000";
5252
webserverProcess.StartInfo.WorkingDirectory = projectRootPath;
5353
webserverProcess.Start();
5454
DateTime timeout = DateTime.Now.Add(TimeSpan.FromSeconds(30));

0 commit comments

Comments
 (0)
Please sign in to comment.