This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using Mobile Center for working with Appium Inspector

Appium Desktop (https://github.com/appium/appium-desktop) provides Appium Server and Inspector in Desktop GUIs for Mac, Windows, and Linux.  The post below explains how to use Appium inspector together with the devices hosted by Mobile Center.

  • Launch Appium Desktop app
  • Open New Session from Appium menu
  • Navigate to Custom Server tab
  • Setup the needed parameters (see attachment)
  1. Mobile Center FQDN/IP and Port
  2. Remote path: /wd/hub
  3. Proxy (if used)
  4. Desired capabilities:

Screen Shot 2019-08-31 at 20.04.37.png

 

  • Please be sure to add browserName capability as empty, otherwise Appium will add the default browser name.
  • It is highly recommended to use OATH Client ID and Secret instead of username/password for the user
  • If you set Anonymous Access option for Appium to NO, please provide userName and password capabilities as well. If it is set to YES - no needed, it will work anonymously.Screen Shot 2018-06-07 at 11.08.04.png

     

 

 

  • Done - Appium Inspector is launched with device hosted by Mobile Center.Screen Shot 2018-06-07 at 11.07.44.png

     

 

 

  • 0

    Hi Evgenyk

       Customer follow the steps and when he start session, it report "Error: could not start session"

    Annonimous Access option is set to No.

    settings in appium server.pngerror.png

  • 0 in reply to 

    Hi Evgenyk

       It is working now.

     

    thank you so much

    Sophia

  • 0 in reply to 

    Hi Sophia,

    Can you please let me know how it worked. The same issue is happening for us and we are not sure how to resolve.

    Thanks

    Vivek

  • Verified Answer

    0 in reply to 

    Hi Vivek

       Firstly, please make sure Remote host is just ip address, without http://

       Also, Close all services which may occupy adb host, like MC connector service, wandoujia, etc.

     

    Hope it helps.

    Sophia

  • 0

    Is it possible to know all the already-running sessions in the "Attach to session" dropdown?

    In version 1.17.0 of appium-desktop, it only allows to attach to a session that is in the dropdown.

    The MC-server does not provide any information in "/wd/hub/sessions" since this information seems to be only in the MC-connector.

  • 0 in reply to 

    Thank you.

  • 0

    Hi 
    This worked for me on appium desktop server but when i am trying to use these capabilities in my selenium/appium code and execute the script.

    Error:

    sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    Can anyone please help?
  • 0 in reply to 

    Hi Ishan,
    If you are testing with an instance of UFTM with SSL (https), this may be an issue with the certificate. For example, if your local computer attempts to connect to a remote server and the security certificates in your Local Computer Keystore, do not match. To solve this issue, you have to import the certificate into the Java Keystore.

  • 0 in reply to 

    I tried solutions available on google for importing certificate(https://stackoverflow.com/questions/21076179/pkix-path-building-failed-and-unable-to-find-valid-certification-path-to-requ) but it didn't work for me.

    I am getting same error.

  • 0 in reply to 

    Hello Ishan,

    I would suggest verifying if you have more than one JRE/JDK installed, that you imported the certificate to the "cacerts" fille corresponding to the version you are using in your test. 
    What I usually do is:
    1) From the UFTM site, export the certificate (as a .cer file)
    2) Then, to import it on the cacerts: 

    Update keystore with the new certificate.

    • Copy the cacerts file to a temporary location. This file is usually under the \security folder of your JRE path. This step is important. In some cases updating directly to Program Files is restricted, and you will receive the keytool error "Access is denied". In this case, you will need to involve your local IT team.

    Example:

    copy "C:\Program Files\Java\jre1.8.0_151\jre\lib\security\cacerts" "C:\temp\cacerts"

    • From a command prompt, run the importcert command.

    Example:

    keytool -importcert -file C:\temp\new.cer -keystore "C:\temp\cacerts" -alias uftmcert

    Note: If you haven't changed it, the default keystore password is: changeit

    • Copy the cacerts file back to the original location.

     

    Validating the Certificate

    • From the command prompt, navigate to the Java installation folder, and run the keytool.exe to extract a newListOutput.txt file with the list command.

    Example:

    keytool -list -keystore "C:\temp\cacerts" > C:\temp\newListOutput.txt

    • Open the newListOutput.txt file and search for the certificate thumbprint