This repository has been archived by the owner on May 29, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
161 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,67 @@ | ||
plugins { | ||
id 'signing' | ||
id 'signing' | ||
} | ||
apply from: 'build.gradle' | ||
|
||
defaultTasks 'clean', 'uploadArchives' | ||
|
||
signing { | ||
sign configurations.archives | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: project.version.endsWith("-SNAPSHOT") ? | ||
'https://oss.sonatype.org/content/repositories/snapshots/' : | ||
'https://oss.sonatype.org/service/local/staging/deploy/maven2/') { | ||
authentication(userName: "$sonatypeUsername", password: "$sonatypePassword") | ||
} | ||
repository(url: project.version.endsWith("-SNAPSHOT") ? | ||
'https://oss.sonatype.org/content/repositories/snapshots/' : | ||
'https://oss.sonatype.org/service/local/staging/deploy/maven2/') { | ||
authentication(userName: "$sonatypeUsername", password: "$sonatypePassword") | ||
} | ||
|
||
pom.project { | ||
name archivesBaseName | ||
packaging 'jar' | ||
description 'Selenide adaptor for Appium framework' | ||
url 'https://github.com/codeborne/selenide-appium' | ||
pom.project { | ||
name archivesBaseName | ||
packaging 'jar' | ||
description 'Selenide adaptor for Appium framework' | ||
url 'https://github.com/codeborne/selenide-appium' | ||
|
||
scm { | ||
url 'scm:git@github.com:codeborne/selenide-appium.git' | ||
connection 'scm:git@github.com:codeborne/selenide-appium.git' | ||
developerConnection 'scm:git@github.com:codeborne/selenide-appium.git' | ||
} | ||
scm { | ||
url 'scm:git@github.com:codeborne/selenide-appium.git' | ||
connection 'scm:git@github.com:codeborne/selenide-appium.git' | ||
developerConnection 'scm:git@github.com:codeborne/selenide-appium.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'MIT' | ||
url 'https://opensource.org/licenses/MIT' | ||
distribution 'repo' | ||
} | ||
} | ||
licenses { | ||
license { | ||
name 'MIT' | ||
url 'https://opensource.org/licenses/MIT' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'asolntsev' | ||
name 'Andrei Solntsev' | ||
} | ||
} | ||
} | ||
developers { | ||
developer { | ||
id 'asolntsev' | ||
name 'Andrei Solntsev' | ||
} | ||
} | ||
} | ||
|
||
//mess with the generated pom to set the 'packaging' tag | ||
pom.withXml { XmlProvider xmlProvider -> | ||
def xml = xmlProvider.asString() | ||
def pomXml = new XmlParser().parse(new ByteArrayInputStream(xml.toString().bytes)) | ||
//mess with the generated pom to set the 'packaging' tag | ||
pom.withXml { XmlProvider xmlProvider -> | ||
def xml = xmlProvider.asString() | ||
def pomXml = new XmlParser().parse(new ByteArrayInputStream(xml.toString().bytes)) | ||
|
||
pomXml.version[0] + { packaging('jar') } | ||
pomXml.version[0] + { packaging('jar') } | ||
|
||
def newXml = new StringWriter() | ||
def printer = new XmlNodePrinter(new PrintWriter(newXml)) | ||
printer.preserveWhitespace = true | ||
printer.print(pomXml) | ||
xml.setLength(0) | ||
xml.append(newXml.toString()) | ||
} | ||
} | ||
def newXml = new StringWriter() | ||
def printer = new XmlNodePrinter(new PrintWriter(newXml)) | ||
printer.preserveWhitespace = true | ||
printer.print(pomXml) | ||
xml.setLength(0) | ||
xml.append(newXml.toString()) | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 18 additions & 18 deletions
36
src/test/java/com/codeborne/selenide/appium/AndroidDriverProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
package com.codeborne.selenide.appium; | ||
|
||
import java.net.MalformedURLException; | ||
import java.net.URL; | ||
|
||
import com.codeborne.selenide.Configuration; | ||
import com.codeborne.selenide.WebDriverProvider; | ||
import io.appium.java_client.android.AndroidDriver; | ||
import io.appium.java_client.remote.MobileCapabilityType; | ||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.remote.DesiredCapabilities; | ||
|
||
import java.net.MalformedURLException; | ||
import java.net.URL; | ||
|
||
import static io.appium.java_client.remote.AndroidMobileCapabilityType.APP_ACTIVITY; | ||
import static io.appium.java_client.remote.AndroidMobileCapabilityType.APP_PACKAGE; | ||
|
||
public class AndroidDriverProvider implements WebDriverProvider { | ||
@Override | ||
public WebDriver createDriver(DesiredCapabilities capabilities) { | ||
Configuration.startMaximized = false; | ||
Configuration.captureJavascriptErrors = false; | ||
@Override | ||
public WebDriver createDriver(DesiredCapabilities capabilities) { | ||
Configuration.startMaximized = false; | ||
Configuration.captureJavascriptErrors = false; | ||
|
||
capabilities.setCapability(MobileCapabilityType.VERSION, "4.4.2"); | ||
capabilities.setCapability("automationName", "Appium"); | ||
capabilities.setCapability("platformName", "Android"); | ||
capabilities.setCapability("deviceName", "0123456789ABCDEF"); | ||
capabilities.setCapability(APP_PACKAGE, "com.android.calculator2"); | ||
capabilities.setCapability(APP_ACTIVITY, "com.android.calculator2.Calculator"); | ||
capabilities.setCapability(MobileCapabilityType.VERSION, "4.4.2"); | ||
capabilities.setCapability("automationName", "Appium"); | ||
capabilities.setCapability("platformName", "Android"); | ||
capabilities.setCapability("deviceName", "0123456789ABCDEF"); | ||
capabilities.setCapability(APP_PACKAGE, "com.android.calculator2"); | ||
capabilities.setCapability(APP_ACTIVITY, "com.android.calculator2.Calculator"); | ||
|
||
try { | ||
return new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); | ||
} catch (MalformedURLException e) { | ||
throw new RuntimeException(e); | ||
} | ||
try { | ||
return new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); | ||
} catch (MalformedURLException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
} |
Oops, something went wrong.