File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/test/java/com/techboy/selenium/beanconfig Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 3
3
import com .techboy .selenium .browserdriver .BrowserDriverExtended ;
4
4
import com .techboy .selenium .config .BrowserCapabilities ;
5
5
import org .openqa .selenium .Proxy ;
6
+ import org .springframework .beans .factory .annotation .Value ;
6
7
import org .springframework .context .annotation .*;
8
+ import org .springframework .context .support .PropertySourcesPlaceholderConfigurer ;
7
9
import org .springframework .core .env .Environment ;
8
10
import org .springframework .core .type .AnnotatedTypeMetadata ;
9
11
20
22
@ Configuration
21
23
public class Beans {
22
24
25
+ @ Value ("${browser}" ) String artist ;
26
+
23
27
@ Inject
24
28
Environment env ;
25
29
@@ -33,6 +37,9 @@ public class Beans {
33
37
34
38
@ PostConstruct
35
39
public void systemPath () throws IOException {
40
+
41
+ System .out .println (artist );
42
+
36
43
if (workingOS .contains ("windows" )) {
37
44
System .setProperty ("webdriver.chrome.driver" ,"selenium_browser_drivers/windowsChromedriver/chromedriver.exe" );
38
45
} else if (workingOS .contains ("mac" )) {
@@ -91,7 +98,11 @@ public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata)
91
98
}
92
99
}
93
100
94
-
101
+ @ Bean
102
+ public
103
+ static PropertySourcesPlaceholderConfigurer placeholderConfigurer () {
104
+ return new PropertySourcesPlaceholderConfigurer ();
105
+ }
95
106
96
107
97
108
You can’t perform that action at this time.
0 commit comments