File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
dotnet/test/common/Environment Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,16 @@ public class EnvironmentManager
22
22
23
23
private EnvironmentManager ( )
24
24
{
25
- var runfiles = Runfiles . Create ( ) ;
26
- var dataFilePath = runfiles . Rlocation ( "selenium/dotnet/test/common/appconfig.json" ) ;
25
+ string dataFilePath ;
26
+ try
27
+ {
28
+ var runfiles = Runfiles . Create ( ) ;
29
+ dataFilePath = runfiles . Rlocation ( "selenium/dotnet/test/common/appconfig.json" ) ;
30
+ }
31
+ catch ( FileNotFoundException )
32
+ {
33
+ dataFilePath = "appconfig.json" ;
34
+ }
27
35
string currentDirectory = this . CurrentDirectory ;
28
36
29
37
string content = File . ReadAllText ( dataFilePath ) ;
Original file line number Diff line number Diff line change @@ -36,8 +36,16 @@ public void Start()
36
36
{
37
37
if ( webserverProcess == null || webserverProcess . HasExited )
38
38
{
39
- var runfiles = Runfiles . Create ( ) ;
40
- standaloneTestJar = runfiles . Rlocation ( standaloneTestJar ) ;
39
+ try
40
+ {
41
+ var runfiles = Runfiles . Create ( ) ;
42
+ standaloneTestJar = runfiles . Rlocation ( standaloneTestJar ) ;
43
+ }
44
+ catch ( FileNotFoundException )
45
+ {
46
+ var baseDirectory = AppContext . BaseDirectory ;
47
+ standaloneTestJar = Path . Combine ( baseDirectory , "../../../../../../bazel-bin/java/test/org/openqa/selenium/environment/appserver" ) ;
48
+ }
41
49
42
50
Console . Write ( "Standalone jar is " + standaloneTestJar ) ;
43
51
You can’t perform that action at this time.
0 commit comments