File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ package selenium .context ;
2
+
3
+ import org .springframework .beans .factory .annotation .Autowired ;
4
+ import org .springframework .beans .factory .annotation .Qualifier ;
5
+ import org .springframework .beans .factory .annotation .Value ;
6
+ import org .springframework .boot .test .SpringApplicationConfiguration ;
7
+ import org .springframework .test .context .testng .AbstractTestNGSpringContextTests ;
8
+ import org .testng .annotations .Listeners ;
9
+ import selenium .listeners .WebDriverListener ;
10
+
11
+ @ Listeners (WebDriverListener .class )
12
+ @ SpringApplicationConfiguration (Application .class )
13
+ public abstract class Base extends AbstractTestNGSpringContextTests {
14
+
15
+ @ Autowired
16
+ @ Qualifier ("appUrl" )
17
+ protected String appUrl ;
18
+
19
+ @ Autowired
20
+ @ Qualifier ("browser" )
21
+ protected String browser ;
22
+
23
+ @ Autowired
24
+ protected FileLoaderService fileLoaderService ;
25
+
26
+ @ Value ("${spring.profiles.active}" )
27
+ String profile ;
28
+
29
+ public String getProfile () {
30
+
31
+ return profile ;
32
+ }
33
+
34
+ public String getAppUrl () {
35
+ return appUrl ;
36
+ }
37
+
38
+ public String getBrowser () {
39
+ return browser ;
40
+ }
41
+ }
Original file line number Diff line number Diff line change 11
11
import org .testng .IInvokedMethod ;
12
12
import org .testng .IInvokedMethodListener ;
13
13
import org .testng .ITestResult ;
14
+ import selenium .context .Base ;
14
15
15
16
import java .io .File ;
16
17
import java .io .FileInputStream ;
You can’t perform that action at this time.
0 commit comments