Skip to content

Commit f530135

Browse files
author
christopher.mbaike
committed
added placeholder for property config
1 parent e9b6d60 commit f530135

File tree

1 file changed

+12
-1
lines changed
  • src/test/java/com/techboy/selenium/beanconfig

1 file changed

+12
-1
lines changed

src/test/java/com/techboy/selenium/beanconfig/Beans.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import com.techboy.selenium.browserdriver.BrowserDriverExtended;
44
import com.techboy.selenium.config.BrowserCapabilities;
55
import org.openqa.selenium.Proxy;
6+
import org.springframework.beans.factory.annotation.Value;
67
import org.springframework.context.annotation.*;
8+
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
79
import org.springframework.core.env.Environment;
810
import org.springframework.core.type.AnnotatedTypeMetadata;
911

@@ -20,6 +22,8 @@
2022
@Configuration
2123
public class Beans {
2224

25+
@Value("${browser}") String artist;
26+
2327
@Inject
2428
Environment env;
2529

@@ -33,6 +37,9 @@ public class Beans {
3337

3438
@PostConstruct
3539
public void systemPath() throws IOException {
40+
41+
System.out.println(artist);
42+
3643
if (workingOS.contains("windows")) {
3744
System.setProperty("webdriver.chrome.driver","selenium_browser_drivers/windowsChromedriver/chromedriver.exe");
3845
} else if (workingOS.contains("mac")) {
@@ -91,7 +98,11 @@ public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata)
9198
}
9299
}
93100

94-
101+
@Bean
102+
public
103+
static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {
104+
return new PropertySourcesPlaceholderConfigurer();
105+
}
95106

96107

97108

0 commit comments

Comments
 (0)