Appium Beginner Tutorial | How to change default port 4723 in Appium

Поділитися
Вставка
  • Опубліковано 18 жов 2024

КОМЕНТАРІ • 20

  • @AbhilashPujari-o6v
    @AbhilashPujari-o6v 21 день тому

    I have followed the video its very nice explanation, clear explanation without doing fast , i am facing one issue, when i run the test, the app is opened and closed immediately, i need some delay so that loading screen is over, Thread.sleep(10000); then also no loading screen display

    • @RaghavPal
      @RaghavPal  19 днів тому +1

      Abhilash
      This often happens because the app takes a bit longer to fully load than you've accounted for
      Here are a couple of things you can try to make sure the loading screen is done before your tests start interacting with the app:
      Explicit Waits: Instead of a fixed Thread.sleep(), use explicit waits in Appium. These tell your test to wait until a specific element on the loading screen is visible or clickable before proceeding. This way, you're not just waiting blindly, but actually waiting for the app to be ready
      Implicit Waits: You can also set an implicit wait at the beginning of your test. This tells Appium to wait for a certain amount of time (e.g., 10 seconds) every time it tries to find an element. So, if an element isn't immediately available, it'll keep trying for a bit before giving up
      Check Appium Logs: Take a look at the Appium server logs. They might give you some clues about why the app is closing so quickly. It could be a crash, or maybe there's some other issue happening behind the scenes.
      Remember, the key is to make your tests wait for the app to be fully loaded and ready before they start interacting with it. Explicit waits are usually the most reliable way to do this, but implicit waits can also be helpful in some cases
      -

    • @AbhilashPujari-o6v
      @AbhilashPujari-o6v 11 днів тому

      @@RaghavPal Thank you, after using Explicit Waits i am able to wait until the image is displayed and then click, its working fine ,
      WebDriverWait wait85 = new WebDriverWait(driver, 20); // 10 seconds wait

      MobileElement password = (MobileElement) wait85.until(ExpectedConditions.visibilityOfElementLocated(By.id("com.text.testing:id/editText")));
      password.click();, thanks a lot for your suggestion, I have another doubt, When I am now facing running the same test multiple time 100 time using @Test(invocationCount = 100)
      Observed, working code fails after 51st or 59th iteration , need your suggestion, Thank you RaghavPal

    • @AbhilashPujari-o6v
      @AbhilashPujari-o6v 10 днів тому

      My appium session is ended unexpectedly, getting the error in the log as : [85965069][HTTP] --> GET /session/85965069-4d19-430c-8f56-f08cb8888762/timeouts {}
      [85965069][AppiumDriver@003d] Encountered internal error running command: NoSuchDriverError: A session is either terminated or not started
      please make one demonstration video only for Appium troubleshoot for mobile automation, thank you Raghav ,

    • @RaghavPal
      @RaghavPal  9 днів тому +1

      I will plan

    • @AbhilashPujari-o6v
      @AbhilashPujari-o6v 9 днів тому

      @@RaghavPal Thank you Raghav Very Much😃

  • @rahulpaditkar5839
    @rahulpaditkar5839 4 роки тому +1

    Can i access different network device using port forwarding option?

    • @RaghavPal
      @RaghavPal  4 роки тому +1

      Hi Rahul, do you mean devices connected on diff network or wifi, I will need to check, You can try at your end

    • @rahulpaditkar5839
      @rahulpaditkar5839 4 роки тому

      @@RaghavPal yes Sir . i want Connect On Diffrent network

    • @rahulpaditkar5839
      @rahulpaditkar5839 4 роки тому

      @@RaghavPal hello sir ,there is one option Custom server,could they allow via internet access?

    • @RaghavPal
      @RaghavPal  4 роки тому +1

      You can try this. I will check more and inform if I get more inputs

    • @rahulpaditkar5839
      @rahulpaditkar5839 4 роки тому

      @@RaghavPal sure sir....plz let me know Asap

  • @Meet-gd2bw
    @Meet-gd2bw Рік тому

    Hi @raghav
    I worked on Appium and my script was working perfectly but suddenly i got the error when run the script. "Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. "
    - I have update appium server to 2.0 and configure all the set up as per Appium documentation but still facing the same issue. I observed that my request is not sent to the appium server. Could you please help me to solve the issue?
    Thanks in advance

    • @RaghavPal
      @RaghavPal  Рік тому +1

      The error message "Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure" can have a few different causes. Here are some things to check:
      * Make sure that the Appium server is running and listening on the correct port. You can check this by opening a web browser and going to localhost:4723. If the Appium server is running, you should see a message saying "Appium REST http interface listener started on localhost:4723".
      * Make sure that the desired capabilities that you are passing to the Appium client are correct. You can find a list of the available desired capabilities in the Appium documentation.
      * Make sure that the version of the Appium client that you are using is compatible with the version of the Appium server that you are running. You can find the version of the Appium client that you are using by running the following command:
      ```
      appium-doctor
      ```
      * Make sure that the firewall on your computer is not blocking the traffic between the Appium client and the Appium server.
      If you have checked all of these things and you are still getting the error, then you can try the following:
      * Restart the Appium server.
      * Clear the cache and restart the Appium client.
      * Try using a different browser to open the Appium web interface.
      If you are still having trouble, then you can post your question on the Appium forum or the Appium Slack channel.
      Here are some additional things that you can try:
      * Check the logs for the Appium server and the Appium client. This can help you to identify the specific cause of the error.
      * Use the Appium desktop app to start a new session. This can help you to rule out any problems with your code.
      * Update the versions of the Appium client and the Appium server.
      I hope this helps

  • @shanumark5990
    @shanumark5990 3 роки тому +1

    Where i can get the note that u written

    • @RaghavPal
      @RaghavPal  3 роки тому

      In the description below the video Shanu

  • @AbhilashPujari-o6v
    @AbhilashPujari-o6v 3 дні тому

    Raghav, I am able to start and stop Appium programmatically , but getting --> C:\WINDOWS\system32>adb uninstall io.appium.uiautomator2.server
    Failure [DELETE_FAILED_INTERNAL_ERROR] need your help to know why this error occur ? how to stop it ?

    • @RaghavPal
      @RaghavPal  День тому

      Abhilash
      The error DELETE_FAILED_INTERNAL_ERROR occurs when you try to uninstall the Appium UIAutomator2 server using the command adb uninstall io.appium.uiautomator2.server. This error is usually related to the Android Debug Bridge (ADB) not being able to delete the package due to an internal error.
      Possible Causes
      The package is still in use or running in the background.
      The device is not properly connected or authorized.
      There are multiple devices connected, and ADB is not targeting the correct device.
      Solution
      To resolve this issue, try the following:
      Restart the device and try uninstalling the package again.
      Use the adb kill-server command to restart the ADB server before uninstalling the package.
      Make sure you have only one device connected and authorized
      -

    • @AbhilashPujari-o6v
      @AbhilashPujari-o6v День тому

      @@RaghavPal I did as you suggested , the problem disappeared like a Magic, i spent lot of time before...thank you Raghav Sir, 😊 👍