If there is a way to run JavaScript command on native app?

#1

I have an appium test running on real device with native application installed. If there is a way to run JavaScript command on native app? Thanks!

0 Likes

#2

Please explain the use case for wanting to run javascript on a native app ?? Is the app a javascript app wrapped in code that makes it look native ??

0 Likes

#3

Hi! No, it’s an android native app.
The use case is to workaround the limitation of searching for objects, the app uses map , and object spy cannot locate elements on it, it’s like a one solid canvas for it. With javascript, it’s may be possible to ‘ask’ the application what is currently on screen. However ((JavascriptExecutor)theDriver).executeScript("***)") didn’t worked for me

0 Likes

#4

My guess is that javascript will not work on a 100% native app. The app isn’t javascript based. However, the folks at Experitest can be more definitive than myself.

The following may help you figure out how to work with a map.

0 Likes