File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed
src/main/java/com/blackboard/testing/driver Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,23 @@ dependencies {
3333
3434task unzipLibs (type : Copy ) {
3535 def libs = file(' ../bin/lib.zip' )
36- def resources = file(" ${ projectDir} /src/main/resources/lib " )
36+ def resources = file(" ${ projectDir} /src/main/resources/" )
3737
3838 from zipTree(libs)
3939 into resources
4040}
4141
42+ task zipLibs (type : Zip ) {
43+ from processResources
44+ archiveName ' lib.zip'
45+ destinationDir(file(' ../bin/' ))
46+ }
47+
4248shadowJar {
4349 from sourceSets. test. output
4450 configurations = [ project. configurations. testRuntime ]
51+ }
4552
46- dependsOn unzipLibs
53+ task deploy (type : Exec ) {
54+ commandLine ' sh' , ' ./build-deploy.sh'
4755}
Original file line number Diff line number Diff line change 55import org .openqa .selenium .WebDriver ;
66import org .openqa .selenium .chrome .ChromeDriver ;
77import org .openqa .selenium .chrome .ChromeOptions ;
8- import org .openqa .selenium .remote .DesiredCapabilities ;
98
109public class LambdaWebDriverFactory extends WebDriverFactory {
1110
12- private DesiredCapabilities desiredCapabilities ;
13-
1411 public LambdaWebDriverFactory () {
1512 System .setProperty ("webdriver.chrome.driver" , getLibLocation ("chromedriver" ));
16- DesiredCapabilities capabilities = DesiredCapabilities .chrome ();
17- capabilities .setCapability (ChromeOptions .CAPABILITY , getLambdaChromeOptions ());
18- capabilities .setBrowserName (this .getClass ().getCanonicalName ());
19- desiredCapabilities = capabilities ;
2013 }
2114
2215 private ChromeOptions getLambdaChromeOptions () {
@@ -40,6 +33,6 @@ private String getLibLocation(String lib) {
4033
4134 @ Override
4235 public WebDriver createWebDriver (Proxy proxy ) {
43- return new ChromeDriver (desiredCapabilities );
36+ return new ChromeDriver (getLambdaChromeOptions () );
4437 }
4538}
You can’t perform that action at this time.
0 commit comments