Integrate PageFactory with PageObjectModel in appium | @AndroidFindBy | @iOSXCUITFindBy

Поделиться
HTML-код
  • Опубликовано: 23 июл 2020
  • Complete tutorial - bit.ly/qav_appiumtutorial
    This video will explain how to integrate PageFactory with PageObjectModel in appium framework and also know how to keep the single code base to run the appium tests in both Android & iOS.
    Sometimes Android & iOS apps behave bit differently based on the native build controls, so we will see how we can automate those rare scenarios based on the platform android or ios.
    You will see the use of @AndroidFindBy & @iOSXCUITFindBy annotations to locate the elements for both Android & iOS, so single webElement can be used for both Android & iOS.
    Code base - github.com/sunilpatro1985/App...

Комментарии • 17

  • @minku2008
    @minku2008 3 года назад +1

    Really Good and informative Video! Good Luck !

  • @peterskiva7954
    @peterskiva7954 Год назад

    the last words in the video is not usually mentioned in tutorials, but it's true.

  • @snehadutta2697
    @snehadutta2697 4 года назад +1

    Thanks for uploading this video. Found it very informative. Here I see that the input text "qavbox" that you passed is static text..How to handle a text that we are getting in runtime?

    • @qavbox
      @qavbox  4 года назад

      I passed the input text as variable yo the xpath, not static text. it's passed dynamically at run time.. if you still have question, then post the line of code here..

    • @snehadutta2697
      @snehadutta2697 4 года назад

      @@qavboxhi.. the code I am talking about is in client machine so I am not able to post it here. But the scenario is like this..suppose, I have a transaction number which generates in runtime. This number is unique and changes everytime. Now if I have to use this number as an input for some other field during automation itself. How can I do that.
      Hope I am not confusing you more :)

  • @Aashish7210
    @Aashish7210 3 года назад

    Thanks. Need help how to implement same concept in cucumber framework?

    • @qavbox
      @qavbox  3 года назад

      Sure, what's the question?

  • @SURAJSALUNKHES
    @SURAJSALUNKHES 8 месяцев назад

    @androidfindby and @iosxcuitestfindby supported in appium 2.0 and java client 8 above?

    • @qavbox
      @qavbox  8 месяцев назад

      AndroidFindBy and iOSXCUITFindBy are applicable for appium 2.0

  • @GirishKumar-pg6vq
    @GirishKumar-pg6vq Год назад

    Hi @qavbox
    I'm getting java.lang.ExceptionInInitializerError while initElements
    PageFactory.initElements(new AppiumFieldDecorator(driver), this);
    Do you have any idea why it is throwing ExceptionInInitializerError?

    • @GirishKumar-pg6vq
      @GirishKumar-pg6vq Год назад

      your response is appreciated

    • @qavbox
      @qavbox  Год назад

      Hello, this issue might be you are using AndroidDriver/IosDriver instead of AppiumDriver type inside pagefactory.initelement()

  • @aborodeolubukola1513
    @aborodeolubukola1513 Год назад

    Hi, thanks for the video. I tried using this method (@AndroidFindBy and @iOSXCUITFindBy) but I keep getting NullPointerException every time I use it.
    Can you pls help? Appium version - 8.1.1
    Thanks

    • @qavbox
      @qavbox  Год назад

      Hello. Did you initialise pagefactory elements with driver object before Appiim By locators?