Could it be true that Appium Server from Appium Studio see more elements than standalone Appium server?

Hi there,

Could it be true that Appium Server from Appium Studio see more elements than standalone Appium server?

On Android after long press on input field, little context menu with “Paste” and possible other options appears.
I noticed that that test generated by Appium Studio is able to click on “Paste” context menu.

driver.findElement(MobileBy.xpath("//*[@text=‘Paste’]")).click();

Our test project runs with standalone Appium server (TestNG + Java Client)
And our test project does NOT SEE this button at all - even page in source.

Actually there are a lot of elements that are visible to Appium studio but not standalone server. Page source is twice as big when using server from Appium Studio.

Other differences I noticed:
Xpath with @id works better on Appium Studio server. ( Standalone works only with @Resource-id )
Lot of xpath’es generated by Appium Studio refuses to work for this reason.

On Standalone texts returned by getText() started to return unicode escape sequences and instead of utf8 symbols. Appium studio server returns escaped sequences. [Hi there \u1F44B],
But that can probably be configured somehow.

Settings on Appium standalone:
{
“value”: {
“imageMatchThreshold”: 0.4,
“fixImageFindScreenshotDims”: true,
“fixImageTemplateSize”: false,
“fixImageTemplateScale”: false,
“defaultImageTemplateScale”: 1,
“checkForImageElementStaleness”: true,
“autoUpdateImageElementPosition”: false,
“imageElementTapStrategy”: “w3cActions”,
“getMatchedImageResult”: true,
“ignoreUnimportantViews”: false,
“allowInvisibleElements”: false,
“actionAcknowledgmentTimeout”: 3000,
“elementResponseAttributes”: “”,
“enableMultiWindows”: false,
“enableNotificationListener”: true,
“keyInjectionDelay”: 0,
“scrollAcknowledgmentTimeout”: 200,
“shouldUseCompactResponses”: true,
“waitForIdleTimeout”: 10000,
“waitForSelectorTimeout”: 10000,
“normalizeTagNames”: false,
“shutdownOnPowerDisconnect”: true,
“trackScrollEvents”: true,
“wakeLockTimeout”: 86356046
}
}

Device Capabilities on Appium Standalone:
{
“value”: {
“platform”: “LINUX”,
“webStorageEnabled”: false,
“takesScreenshot”: true,
“javascriptEnabled”: true,
“databaseEnabled”: false,
“networkConnectionEnabled”: true,
“locationContextEnabled”: false,
“warnings”: {},
“desired”: {
“platformName”: “android”,
“appActivity”: “my.test.com.presentation.screens.splash.SplashActivity”,
“appPackage”: “my.test.com”,
“deviceName”: “SM-A202F”,
“fullReset”: false,
“ignoreUnimportantViews”: false,
“noReset”: true,
“platformVersion”: “9.0.0”,
“udid”: “ZY225FBW4K”
},
“platformName”: “android”,
“appActivity”: “my.test.com.presentation.screens.splash.SplashActivity”,
“appPackage”: “my.test.com”,
“deviceName”: “ZY225FBW4K”,
“fullReset”: false,
“ignoreUnimportantViews”: false,
“noReset”: true,
“platformVersion”: “9”,
“udid”: “ZY225FBW4K”,
“deviceUDID”: “ZY225FBW4K”,
“deviceApiLevel”: 28,
“deviceScreenSize”: “1080x2270”,
“deviceScreenDensity”: 480,
“deviceModel”: “moto g(7) plus”,
“deviceManufacturer”: “motorola”,
“pixelRatio”: 3,
“statBarHeight”: 110,
“viewportRect”: {
“left”: 0,
“top”: 110,
“width”: 1080,
“height”: 1906
}
}
}

Device Capabilities on Appium Studio:
{
“sessionId”: “97d7df40-3672-4963-9363-ec49fb128016”,
“value”: {
“appPackage”: “my.test.com”,
“device.majorVersion”: “9”,
“dontGoHomeOnQuit”: false,
“device.os”: “Android”,
“noReset”: true,
“dontStopAppOnReset”: false,
“reservationDuration”: 240,
“reportFormat”: “xml”,
“deviceName”: “SM-A202F”,
“fullReset”: false,
“ignoreUnimportantViews”: false,
“deviceUDID”: “ZY225FBW4K”,
“install.only.for.update”: false,
“desired”: {
“appActivity”: “my.test.com.presentation.screens.splash.SplashActivity”,
“appPackage”: “my.test.com”,
“noReset”: true,
“platformVersion”: “9.0.0”,
“platformName”: “Android”,
“udid”: “ZY225FBW4K”,
“deviceName”: “SM-A202F”,
“fullReset”: false,
“ignoreUnimportantViews”: false
},
“device.serialNumber”: “ZY225FBW4K”,
“locationServicesAuthorized”: false,
“device.version”: “9”,
“platformVersion”: “9.0.0”,
“reportDirectory”: “reports”,
“autoWebview”: false,
“platformName”: “Android”,
“udid”: “ZY225FBW4K”,
“testName”: “mobile test 01/21/20 10:45 AM”,
“device.screenSize”: “1080x2270”,
“useKeystore”: false,
“test.type”: “Mobile”,
“device.manufacture”: “motorola”,
“instrumentApp”: false,
“appiumVersion”: “1.8.0”,
“device.category”: “PHONE”,
“autoDismissAlerts”: false,
“reportUrl”: “C:\Users\marci\appiumstudio-reports\reports\test282”,
“newSessionWaitTimeout”: 300,
“keystorePath”: “~/.android/debug.keystore”,
“appActivity”: “my.test.com.presentation.screens.splash.SplashActivity”,
“waitForDeviceTimeout”: 120000,
“device.model”: “moto g(7) plus”,
“device.name”: “moto g(7) plus”,
“autoGrantPermissions”: false,
“takeScreenshots”: true,
“projectName”: “”,
“autoAcceptAlerts”: false
},
“status”: 0
}

Only thing that I change in my configuration right now, is server port, and for some reason test works (see elements) with Appium Studio server, but does not see with standalone server.
Standalone server was installed using npm, (for image recognition feature).

Appium Studio is a separate commercial product, which has nothing to do with Open Source Appium project at all (perhaps only except of (mostly) compatible APIs and the Appium part in its name).

You could try to enable enableMultiWindows setting for UIA2 driver to get more items in the page source (only present in the most recent Appium release)

Thank you.
enableMultiWindows actually allows to see elements.

But Could it be if I enable this setting for all tests I start to see a lot more StaleElementReferenceExceptions:
“org.openqa.selenium.StaleElementReferenceException: The element ‘By.id: xxxx’ does not exist in DOM anymore” ?