Skip to content

Commit f16c08e

Browse files
committed
Revert "Remove service from event"
This reverts commit 164828f.
1 parent 164828f commit f16c08e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

dotnet/test/common/Environment/DriverFactory.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,17 @@ public IWebDriver CreateDriverWithOptions(Type driverType, DriverOptions driverO
127127
service.DriverServiceExecutableName = Path.GetFileName(this.driverPath);
128128
}
129129

130-
this.OnDriverLaunching(options);
130+
this.OnDriverLaunching(service, options);
131131

132132
driver = (IWebDriver)Activator.CreateInstance(driverType, service, options);
133133
return driver;
134134
}
135135

136-
protected void OnDriverLaunching(DriverOptions options)
136+
protected void OnDriverLaunching(DriverService service, DriverOptions options)
137137
{
138138
if (this.DriverStarting != null)
139139
{
140-
DriverStartingEventArgs args = new DriverStartingEventArgs(options);
140+
DriverStartingEventArgs args = new DriverStartingEventArgs(service, options);
141141
this.DriverStarting(this, args);
142142
}
143143
}

dotnet/test/common/Environment/DriverStartingEventArgs.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ namespace OpenQA.Selenium.Environment
2121
{
2222
public class DriverStartingEventArgs
2323
{
24+
DriverService service;
2425
DriverOptions options;
2526

26-
public DriverStartingEventArgs(DriverOptions options)
27+
public DriverStartingEventArgs(DriverService service, DriverOptions options)
2728
{
29+
this.Service = service;
2830
this.Options = options;
2931
}
3032

33+
public DriverService Service { get => service; set => service = value; }
34+
3135
public DriverOptions Options { get => options; set => options = value; }
3236
}
3337
}

0 commit comments

Comments
 (0)