diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4180930..8543028 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 appium driver list echo "Appium Windows Driver installed" @@ -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' diff --git a/pom.xml b/pom.xml index 412e696..06be764 100644 --- a/pom.xml +++ b/pom.xml @@ -114,17 +114,29 @@ org.seleniumhq.selenium selenium-api - 4.52.0 + 4.53.0 org.seleniumhq.selenium selenium-support - 4.52.0 + 4.53.0 org.seleniumhq.selenium selenium-chrome-driver - 4.51.0 + 4.53.0 + test + + + org.seleniumhq.selenium + selenium-devtools-latest + 4.53.0 + test + + + org.slf4j + slf4j-simple + 2.0.19 test @@ -136,7 +148,7 @@ org.apache.commons commons-lang3 - 3.21.0 + 3.22.0 test @@ -146,7 +158,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.15.0 + 3.16.0 11 11 @@ -255,7 +267,7 @@ org.codehaus.mojo versions-maven-plugin - 2.21.0 + 2.23.0 diff --git a/src/test/java/tests/applications/windowsApp/WindowsApplication.java b/src/test/java/tests/applications/windowsApp/WindowsApplication.java index d16f4b7..1a8d27a 100644 --- a/src/test/java/tests/applications/windowsApp/WindowsApplication.java +++ b/src/test/java/tests/applications/windowsApp/WindowsApplication.java @@ -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)); } diff --git a/src/test/java/tests/elements/CachedWindowsElementTests.java b/src/test/java/tests/elements/CachedWindowsElementTests.java index 05b7de4..5845238 100644 --- a/src/test/java/tests/elements/CachedWindowsElementTests.java +++ b/src/test/java/tests/elements/CachedWindowsElementTests.java @@ -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")); } diff --git a/src/test/java/tests/elements/ElementFinderTests.java b/src/test/java/tests/elements/ElementFinderTests.java index b629f5e..e5c0c76 100644 --- a/src/test/java/tests/elements/ElementFinderTests.java +++ b/src/test/java/tests/elements/ElementFinderTests.java @@ -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 -> { diff --git a/src/test/java/tests/elements/WindowsElementTests.java b/src/test/java/tests/elements/WindowsElementTests.java index d3c04c1..6fe2d5f 100644 --- a/src/test/java/tests/elements/WindowsElementTests.java +++ b/src/test/java/tests/elements/WindowsElementTests.java @@ -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