Appium Studio-Appium-Eclipse-Testng-Emulator Query

Hello,

I am facing so many issues in using appium studio community edition -appium and eclipse.
following are details;
1.I have recorded one script in Testng in appium studio by using an app(.apk) installed and launching on my real device.
2. Copy paste it in eclipse in java class under java project by adding reference libraries.
3. Then make few text changes like data / description and saved and run it on same real device.
Issues I am facing;

  1. Appium studio constantly showing an emulator (opened from AVD of eclipse) offline.
    2.If my appium studio is opened with my device opened and I run the script in java then no actions happened 3. If appium studio is opened with my device opened and try to start the appium server it gives some wierd error and on closing appium studio it starts smoothly…
    4.I could run the recorded and edited script only at once when appium server / appium studio and my device is opened but second time on-words i am receiving one constant error (An element could not be located on the page using the given search parameters.)
  2. I installed an test apk on an emulator(from AVD), now when trying to run that its giving an error with activity name and app package.I put same app package and app activity name as recorded for real device.
    I checked under UIAutomator about the apppackage then its showing android launcher then I made changes accordingly then apppackage error disappear now only appactivity error left. but how to get app activity name for the same app on emulator?is it different from real device.?

I tried with different versions of appium 1.5 to 1.7. on three different machines with Windows7, windows8.and windows10. As it runs fine and smooth for 5 mins with long workflow, I think configuration is fine.

I tried to search across many forums but no satisfactory solution.
Any proper solutuion?

Hi,

  1. Appium studio constantly showing an emulator (opened from AVD of eclipse) offline
    I would recommend to install Android Studio and set the appropriate System Environment Variables
    1.2 If my AS is opened with my device opened and I run script in Java then no actions
    Very little information to go based on, but as my previous recommendation, to properly work with Emulators please try Android Studio.
    1.3 If AS is opened with by device opened and try to start the Appium Server it gives some weird error and on closing Appium Studio it starts smoothly
    Can you please clarify this, what error are you getting? Appium Server and OUR Appium Studio both runs on localhost:4723, you can’t have both open on the same port.
    1.4 I could run the recorded and edited script only at once when Appium Server / AS and my device is opened but second time on-wards I am receiving one constant error
    When you work with our Appium Studio, we give you capabilities that Appium Server does not provide. I am not sure I understand your question, but if you have recorded something on Appium Studio and try to run it on Appium Server it may not go too well.

  2. I installed test APK on Emulator, its giving me error with Activity Name and App Package, whats the activity name

    Okay, here is an example of the full App Name:

     MobileCapabilityType.App, "com.cvs.launchers.cvs/.StartupActivity"
    

    And this is if you would write it in Package and Activity:

    AndroidMobileCapabilityType.APP_PACKAGE, "com.cvs.launchers.cvs"
    AndroidMobileCapabilityType.APP_ACTIVITY, ".StartupActivity"
    

    It should be the same for Emulator and Real Devices

Thanks for your reply.

  1. I have android studio install and variable set properly.
    1.3 Below is the error given by appium server when appium studio is opend
    “Error starting Appium server:listen EADDRINUSE 0.0.0.0:4723”
    I think this is what you are saying to change the port. in that case what port should I use. because my script run well thrice with same port when AS, appium server was on.
    1.4.1: recorded script run well thrice for me with no changes except adding reference libraries in eclipse. etc.
  2. I tried with the same name of activity and package on both real device and emulator but not working.

Now my main issue is getting an error >" org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)" When same script run well thrice and suddenly it stopped running.
Any solution to this. I have changed devices and systems too but error is as it is. My app gets launched but instantly stuck here stating above error. I am using Java-Test NG.In eclipse I configured accordingly.
Another query is: while running the test script I see it on my real device. How to see my real device on my desktop clean while script is running?
When we run any android project before running it asks for the device in the target section under run configuration part of eclipse but if a normal java project and java class test ng project running then its not showing target to select.

Another thin I have check is,appium server start button shows Start “ServerV1.7.2” and when we check in by clicking ‘About appium’ file tab it shows Appium Version1.5.0. Its not a show stopper but confusing to user.

Thanks.

Hi apologies for the late reply,

As for running Appium Server on a separate port, I believe there is an option to do so when opening Appium Desktop.

I am not sure I understand your issue clearly, NoSuchElementException can occur on multiple occasions, perhaps you are trying to run a script on Appium Server that you created in Appium Studio?
To better understand your situation I would need more information such as code example.

While running the test script I see it on my real device. How to see my real device on my desktop clean while script is running?

On Appium Studio there is a button to open reflection in order for you to see the device on your desktop.

When we run any android project before running it asks for the device in the target section under run configuration part of eclipse but if a normal java project and java class test ng project running then its not showing target to select

You need to configure this in your Capabilities, here is an example:

DesiredCapabilities dc = new DesiredCapabilities();
// Use UDID of your device
dc.setCapability(MobileCapabilityType.UDID, "YOUR_DEVICE_UDID");
// Or use DeviceQuery and pass your Device Name
dc.setCapability("deviceQuery", "adb:samsung SMG900F");
driver = new AndroidDriver<>(url, dc);

Another thin I have check is,appium server start button shows Start “ServerV1.7.2” and when we check in by clicking ‘About appium’ file tab it shows Appium Version1.5.0. Its not a show stopper but confusing to user.

We have no control over this, Appium Server is unrelated to us, Appium Server is an open source project. All we do with Appium Studio is to be kind of a wrapper around Appium Server, meaning Appium Studio provides you all capabilities regular Appium would provide, plus more.