Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions Not Working on some elements with WebdriverIO and Appium-Flutter-Driver #691

Open
KasunYapa96 opened this issue May 21, 2024 · 0 comments

Comments

@KasunYapa96
Copy link

Framework and Tools:

  • WebdriverIO (wdio) with JS
  • Appium
  • appium-flutter-driver

Problem Description:

I am using the WebdriverIO (wdio) framework combined with appium-flutter-driver to automate a Flutter application. The script successfully launches the app and performs the sign-in flow without any issues. However, after the sign-in process, when the automation script redirects to the homepage, none of the actions specified in the script are executed.
For example, I have defined a key-value pair for the "recharge" button on the homepage screen. The click action for this button does not work. The assigned ID from the flutter driver is visible in the terminal, but the action does not execute until the default timeout is reached.

Questions:

  1. App Limitation: Could this issue be due to a limitation within the application itself?
  2. Driver Limitation: Is this a known limitation or issue with the appium-flutter-driver?
  3. Security Concerns: Could specific interactions with app screens affect any security mechanisms within the app?

Steps to Reproduce:

Set up a WebdriverIO project with appium-flutter-driver.
Automate the sign-in flow of the Flutter application.
Attempt to perform actions on the homepage (e.g., clicking the "recharge" button).

Example for clicking an Element :

Login ->

async changeLanguage() {
 
        const lanSelect = find.byText('FR');
        const msg=await driver.getElementText(lanSelect);
        console.log(msg);
        assert.strictEqual(msg,'FR')
        await driver.elementClick(lanSelect);
 
        const english = find.byText('EN');
        await driver.elementClick(english);
    }
 
    async enterMSISDN(phoneNumber) {
        const qaTxtbox = find.byValueKey('quickAccessTextBox');
        await driver.elementSendKeys(qaTxtbox, phoneNumber)
    }

Clicking on Recharge Button ->

Tried below 3 different ways for button clicking and none of these working.

async clickonRechargeBtn(){
 
await driver.elementClick(find.byText('Recharge'));
 
await driver.elementClick(find.byValueKey('recharge_btn'));
 
await driver.execute('flutter:clickElement', recharge_btn, {timeout:50000});
 
}

Terminal Logs :

MicrosoftTeams-image (18)


Error in "Scratch Card - Manually Number Enter.Verify the user can enters the valid scratch card code manually"
Error: Timeout of 600000ms exceeded. The execution in the test "Scratch Card - Manually Number Enter 
Verify the user can enters the valid scratch card code manually" took too long. Try to reduce the run time or increase your timeout for test specs (https://webdriver.io/docs/timeouts). (E:\QA Docs and Tutorials\Flutter\Flutter Repo\flutter-automation\test\specs\Recharge.test.js)
    at createTimeoutError (E:\QA Docs and Tutorials\Flutter\Flutter Repo\flutter-automation\node_modules\mocha\lib\errors.js:498:15)
    at Test.Runnable._timeoutError (E:\QA Docs and Tutorials\Flutter\Flutter Repo\flutter-automation\node_modules\mocha\lib\runnable.js:431:10)
    at Timeout.<anonymous> (E:\QA Docs and Tutorials\Flutter\Flutter Repo\flutter-automation\node_modules\mocha\lib\runnable.js:246:24)
    at listOnTimeout (node:internal/timers:573:17)
    at processTimers (node:internal/timers:514:7)

Expected Behavior:

The actions specified in the script (such as clicking the "recharge" button) should execute successfully on the homepage.
Actual Behavior:The actions do not execute and timeout without performing the intended operations.

Additional Information:

The terminal shows that the assigned ID for the elements on the homepage is correctly identified by the flutter driver.
No errors or exceptions are thrown; the actions simply do not execute.

Environment and Dependencies :

"devDependencies": {

"@wdio/allure-reporter": "^8.29.2",
"@wdio/appium-service": "^8.29.1",
"@wdio/cli": "^8.29.1",
"@wdio/local-runner": "^8.29.2",
"@wdio/mocha-framework": "^8.29.1",
"appium": "^2.4.0",
"appium-flutter-driver": "^2.4.0",
"appium-flutter-finder": "^0.2.0",
"assert": "^2.1.0",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"

},

I would appreciate any guidance on resolving this issue. Insights into whether this could be an application limitation, a driver issue, or if there are any security concerns with automating specific screens in the app would be very helpful.

@KasunYapa96 KasunYapa96 changed the title Actions Not Working on Homepage with WebdriverIO and Appium-Flutter-Driver Actions Not Working on some elements with WebdriverIO and Appium-Flutter-Driver May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant