Skip to content

Commit e45dbaa

Browse files
authored
Merge pull request #10 from blackboard/bugfix/deployment
Fix build libs
2 parents bb02f0a + f72da70 commit e45dbaa

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

bin/lib.zip

168 KB
Binary file not shown.

lambda-selenium-java/build.gradle

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,23 @@ dependencies {
3333

3434
task 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+
4248
shadowJar {
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
}

lambda-selenium-java/src/main/java/com/blackboard/testing/driver/LambdaWebDriverFactory.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,11 @@
55
import org.openqa.selenium.WebDriver;
66
import org.openqa.selenium.chrome.ChromeDriver;
77
import org.openqa.selenium.chrome.ChromeOptions;
8-
import org.openqa.selenium.remote.DesiredCapabilities;
98

109
public 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
}

0 commit comments

Comments
 (0)