2

We are using Selenium and Appium to automate salesforce mobile app on mobile devices. On Android devices Appium is not able to identify individual elements within Webview, entire screen is identified as a single element, we need locators of each element to develop automated test acripts.

Salesforce support team said they will not support this issue. We look into Appium documentation and it says setWebContentsDebuggingEnabled should be enabled to automate with Appium.

On IOS Appium is working without any issues.

Please let me know if someone automated salesforce mobile app on andriod devices. Appreciate any help. Thank you.

0

The issue you are running into is that we use an Android security feature to protect against screenshots. You will need to comment out the line below in the LoginActivity class:

        // Protect against screenshots.
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,
            WindowManager.LayoutParams.FLAG_SECURE);

If you aren't consuming via source you can clone the android repo, comment out the line and run any of our sample apps to get your accessibility ids.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.