Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,23 @@ jobs:
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '22.x'
versionSpec: '26.x'

- task: CmdLine@2
displayName: 'Install Appium'
displayName: 'Install Appium v4 (beta)'
inputs:
script: |
echo "Installing Appium"
npm install -g appium@latest
npm install -g appium@beta
appium --version
echo "Appium installed"

- task: CmdLine@2
displayName: 'Install Appium Windows Driver'
displayName: 'Install Appium Windows Driver (wincore)'
inputs:
script: |
echo "Installing Appium Windows Driver"
appium driver install windows
appium driver install --source=npm appium-wincore-driver
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
appium driver list
echo "Appium Windows Driver installed"

Expand All @@ -75,10 +75,8 @@ jobs:
inputs:
script: |
echo "Installing and Running Appium doctor"
npm install -g request@2.34.0
appium driver doctor windows
appium driver doctor wincore
echo "Appium doctor executed"
echo "Appium doctor installed and executed"

- task: CmdLine@2
displayName: 'Start Appium server'
Expand Down
24 changes: 18 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,29 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>4.52.0</version>
<version>4.53.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>4.52.0</version>
<version>4.53.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>4.51.0</version>
<version>4.53.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-devtools-latest</artifactId>
<version>4.53.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.19</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -136,7 +148,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.21.0</version>
<version>3.22.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -146,7 +158,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<version>3.16.0</version>
<configuration>
<source>11</source>
<target>11</target>
Expand Down Expand Up @@ -255,7 +267,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.21.0</version>
<version>2.23.0</version>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class WindowsApplication implements IApplication {
WindowsApplication(long implicitWaitSeconds, String appPath, URL serviceUrl) {
WindowsOptions options = new WindowsOptions();
options.setApp(appPath);
options.setAutomationName("Wincore");
driver = new WindowsDriver(serviceUrl, options);
setImplicitWaitTimeout(Duration.ofSeconds(implicitWaitSeconds));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void testShouldWorkWithCalculatorWithCachedElement() {
new CachedButton(CalculatorWindow.getPlusButtonLoc()).click();
new CachedButton(CalculatorWindow.getOneButtonLoc()).click();
new CachedButton(CalculatorWindow.getEqualsButtonLoc()).click();
String result = new CachedButton(CalculatorWindow.getResultsLabelLoc()).getElement().getText();
String result = new CachedButton(CalculatorWindow.getResultsLabelLoc()).getElement().getAttribute("Value");
Assert.assertTrue(result.contains("2"));
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/tests/elements/ElementFinderTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public IElementFinder getElementFinder() {
@Test
public void shouldBePossibleToUseConditionalWaitWithElementFinder() {
BooleanSupplier elementFinderCondition = () ->
getElementFinder().findElement(CalculatorWindow.getResultsLabelLoc()).getText().contains("3");
getElementFinder().findElement(CalculatorWindow.getResultsLabelLoc()).getAttribute("Value").contains("3");
Assert.assertFalse(elementFinderCondition.getAsBoolean(), "condition should not match before actions");
Assert.assertTrue(AqualityServices.get(IConditionalWait.class)
.waitFor(driver -> {
Expand Down
6 changes: 4 additions & 2 deletions src/test/java/tests/elements/WindowsElementTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,16 @@ public void testShouldBePossibleToGetElementWithCustomTimeout() {
@Test
public void testShouldBePossibleToClickOnElementAndGetText() {
CalculatorWindow.getOneButton().click();
Assert.assertEquals(CalculatorWindow.getLeftValueTextBox().getText(), "1", "1 should be entered");
Assert.assertEquals(CalculatorWindow.getLeftValueTextBox().getText(), "", "Text should remain empty for input field");
Assert.assertEquals(CalculatorWindow.getLeftValueTextBox().getAttribute("Value"), "1", "1 should be entered");
}

@Test
public void testShouldBePossibleToSendKeysToElement() {
String keys = "12";
CalculatorWindow.getLeftValueTextBox().sendKeys(keys);
Assert.assertEquals(CalculatorWindow.getLeftValueTextBox().getText(), keys, "Keys should be entered");
Assert.assertEquals(CalculatorWindow.getLeftValueTextBox().getText(), "", "Text should remain empty for input field");
Assert.assertEquals(CalculatorWindow.getLeftValueTextBox().getAttribute("Value"), keys, "Keys should be entered");
}

@Test
Expand Down
Loading