Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Automating Hybrid Applications with Appium

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Wird geladen in …3
×

Hier ansehen

1 von 103 Anzeige

Automating Hybrid Applications with Appium

Herunterladen, um offline zu lesen

When creating a mobile application, organisations have a few options to choose from; mobile web, native or a hybrid application. Where web apps are just websites that can be accessed on the internet via a mobile browser like Chrome or Safari, native apps are applications that are developed for a specific platform such as Android or iOS. Hybrid apps are different because they possess elements from native apps and web apps.

When automating web applications, Selenium commands are used. Nine out of ten times the same automation script can be used for mobile web applications as our desktop web applications. With native apps however, we need to look deeper into the differences between Android and iOS apps before we can use Appium commands.

But how should you automate hybrid apps, can or do you need to choose one of the two automation strategies or is there also a hybrid approach for automating hybrid apps?

That’s what we are going to talk about during this webinar. We will be looking into how to detect a hybrid application for Android and iOS, the do’s and the don’ts when it comes to automating a hybrid application and we will provide you with tips and tricks on how to make this work for both Android and iOS.

By the end of this webinar, you’ll be able to create your own Appium scripts to automate Android and iOS hybrid mobile applications.

Key Takeaways:
- Understand what a hybrid mobile application is
- How to detect a hybrid mobile application
- Learn how iOS and Android handle hybrid mobile applications
- Learn how to automate hybrid mobile applications

When creating a mobile application, organisations have a few options to choose from; mobile web, native or a hybrid application. Where web apps are just websites that can be accessed on the internet via a mobile browser like Chrome or Safari, native apps are applications that are developed for a specific platform such as Android or iOS. Hybrid apps are different because they possess elements from native apps and web apps.

When automating web applications, Selenium commands are used. Nine out of ten times the same automation script can be used for mobile web applications as our desktop web applications. With native apps however, we need to look deeper into the differences between Android and iOS apps before we can use Appium commands.

But how should you automate hybrid apps, can or do you need to choose one of the two automation strategies or is there also a hybrid approach for automating hybrid apps?

That’s what we are going to talk about during this webinar. We will be looking into how to detect a hybrid application for Android and iOS, the do’s and the don’ts when it comes to automating a hybrid application and we will provide you with tips and tricks on how to make this work for both Android and iOS.

By the end of this webinar, you’ll be able to create your own Appium scripts to automate Android and iOS hybrid mobile applications.

Key Takeaways:
- Understand what a hybrid mobile application is
- How to detect a hybrid mobile application
- Learn how iOS and Android handle hybrid mobile applications
- Learn how to automate hybrid mobile applications

Anzeige
Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Ähnlich wie Automating Hybrid Applications with Appium (20)

Anzeige

Weitere von Sauce Labs (20)

Aktuellste (20)

Anzeige

Automating Hybrid Applications with Appium

  1. 1. @wswebcreation Automating Hybrid Apps with Appium Wim Selles | Sr. Solutions Architect at Sauce Labs
  2. 2. @wswebcreation ● Mobile Apps and their Differences ● WebViews ● Why Automate Them ● Detecting WebViews ● Appium and Contexts ● Advanced Topics ● Exciting News Agenda 2
  3. 3. Mobile Apps
  4. 4. @wswebcreation Types of Apps 4 Native App
  5. 5. @wswebcreation Types of Apps 5 Web App
  6. 6. @wswebcreation Types of Apps 6 Hybrid App Hybrid App can be seen as a Native App that uses a mobile WebView object.
  7. 7. @wswebcreation Types of Apps 6 Hybrid App Hybrid App can be seen as a Native App that uses a mobile WebView object. WebView Native
  8. 8. @wswebcreation A Web View loads and displays Rich Web Content directly within your app. WebViews 7
  9. 9. @wswebcreation You can serve Rich Web Content from: • embedded HTML (internal hosted content) • websites (external hosted content) WebViews 8 Rich Web Content
  10. 10. @wswebcreation WebViews 9 Technology Android: • Uses Android System WebView • Powered by Chrome • Separate System App • Independent App Updates iOS: • Uses WKWebView* • Powered by Safari • “Embedded” in the OS • Tied to Platform Updates * previously UIWebView, UIWebView has been deprecated since iOS 12 which also had an impact on Appium
  11. 11. @wswebcreation 10
  12. 12. Automating WebViews
  13. 13. @wswebcreation 12
  14. 14. @wswebcreation 13
  15. 15. @wswebcreation 13 “How to Become an Appium Desktop Ninja”: https://youtube.com/playlist?list=PL67l1VPxOnT4J8Kgpvi1TK0iuMwO7SJNn (6 chapters)
  16. 16. @wswebcreation Automating WebViews 14 Native Element Selection for Android and iOS
  17. 17. @wswebcreation 15
  18. 18. @wswebcreation 15
  19. 19. @wswebcreation 16 WebView Element Selection for Android and iOS Automating WebViews
  20. 20. @wswebcreation 17
  21. 21. @wswebcreation • Translated Native Views are slower and more flaky • Have access to the URL • Have access to Application Storage like: • localStorage • sessionStorage • cookies • Manipulate the DOM • Same selectors for Android and iOS • And many more … Automating WebViews 18 Advantages
  22. 22. @wswebcreation 19
  23. 23. @wswebcreation Automating WebViews 20 Downsides Will get back to that later =)
  24. 24. Detecting iOS WebViews
  25. 25. @wswebcreation 22
  26. 26. @wswebcreation 22
  27. 27. @wswebcreation 22
  28. 28. @wswebcreation 22
  29. 29. @wswebcreation 22
  30. 30. Detecting Android WebViews
  31. 31. @wswebcreation 24 @wswebcreation
  32. 32. @wswebcreation 24 @wswebcreation
  33. 33. @wswebcreation 24 @wswebcreation
  34. 34. @wswebcreation Android- Remote Debugging WebViews 25 More info: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/webviews
  35. 35. @wswebcreation 26 @wswebcreation
  36. 36. @wswebcreation 26 @wswebcreation
  37. 37. @wswebcreation 26 @wswebcreation
  38. 38. Detecting WebViews With Appium Desktop
  39. 39. @wswebcreation 28
  40. 40. @wswebcreation 28
  41. 41. @wswebcreation 28
  42. 42. @wswebcreation 29
  43. 43. @wswebcreation 29
  44. 44. @wswebcreation 30
  45. 45. @wswebcreation 30
  46. 46. @wswebcreation 30
  47. 47. Appium and Contexts
  48. 48. @wswebcreation Appium and Contexts 32 The circumstances that form the setting for an event, statement, or idea, and in terms of which it can be fully understood. What is a Context
  49. 49. @wswebcreation Appium and Contexts 33 Appium knows ….. Android: • NATIVE_APP • WEBVIEW_com.saucelabshybridapp • WEBVIEW_com.chrome • Naming convention: • WEBVIEW_{packageName} iOS: • NATIVE_APP • WEBVIEW_8891.12 • WEBVIEW_8891.2 • Naming convention: • WEBVIEW_{id} 1-N Contexts
  50. 50. @wswebcreation 34 Get All Context Appium and Contexts More info: http://appium.io/docs/en/commands/context/get-contexts/
  51. 51. @wswebcreation 34 Get All Context Appium and Contexts More info: http://appium.io/docs/en/commands/context/get-contexts/
  52. 52. @wswebcreation 35 Get Current Context Appium and Contexts More info: http://appium.io/docs/en/commands/context/get-context/
  53. 53. @wswebcreation 35 Get Current Context Appium and Contexts More info: http://appium.io/docs/en/commands/context/get-context/
  54. 54. @wswebcreation 36 Set Current Context Appium and Contexts More info: http://appium.io/docs/en/commands/context/set-context/
  55. 55. @wswebcreation When your Hybrid App starts with a WebView! 37 Tip! Appium and Contexts More info: http://appium.io/docs/en/writing-running-appium/caps/index.html
  56. 56. @wswebcreation When your Hybrid App starts with a WebView! 37 Tip! Appium and Contexts More info: http://appium.io/docs/en/writing-running-appium/caps/index.html
  57. 57. Advanced
  58. 58. @wswebcreation Biggest ones: • ChromeDriver Versions Advanced 39 Downsides
  59. 59. @wswebcreation Biggest ones: • ChromeDriver Versions • Lack of WebView Information • Multiple WebView Differences Advanced 39 Downsides
  60. 60. @wswebcreation Each version of Appium comes bundled with the latest known version of ChromeDriver at moment of installing. Advanced 40 ChromeDriver Version More info: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md
  61. 61. @wswebcreation Appium can automatically detect the correct ChromeDriver for the version of Chrome under test Advanced 41 ChromeDriver Version
  62. 62. @wswebcreation Advanced 42 ChromeDriver Version
  63. 63. @wswebcreation Advanced 43 ChromeDriver Version More info: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md
  64. 64. @wswebcreation 44
  65. 65. @wswebcreation Advanced 45 ChromeDriver Version - Fixes More info: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md • Appium can automatically detect the correct ChromeDriver for the version of Chrome under test • Automatically Download corresponding ChromeDriver Version • Provide it • Use a cloud service like Sauce Labs
  66. 66. @wswebcreation Advanced 46 ChromeDriver Auto Detect More info: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md
  67. 67. @wswebcreation Advanced 47 ChromeDriver Auto Detect More info: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md
  68. 68. @wswebcreation Advanced 48 Lack of WebView Information
  69. 69. @wswebcreation Advanced 49 Lack of WebView Information
  70. 70. @wswebcreation Advanced 49 Lack of WebView Information
  71. 71. @wswebcreation Advanced 49 Lack of WebView Information
  72. 72. @wswebcreation Advanced 49 Lack of WebView Information
  73. 73. @wswebcreation Advanced 49 Lack of WebView Information
  74. 74. @wswebcreation Advanced 49 Lack of WebView Information
  75. 75. @wswebcreation Advanced 49 Lack of WebView Information
  76. 76. @wswebcreation Advanced 49 Lack of WebView Information
  77. 77. @wswebcreation Advanced 50 Multiple WebView Differences
  78. 78. @wswebcreation Advanced 50 Multiple WebView Differences
  79. 79. @wswebcreation Advanced 50 Multiple WebView Differences
  80. 80. @wswebcreation Advanced 50 Multiple WebView Differences
  81. 81. @wswebcreation Advanced 50 Multiple WebView Differences
  82. 82. @wswebcreation Advanced 50 Multiple WebView Differences
  83. 83. @wswebcreation 51 Advanced Multiple WebView Differences More info: http://appium.io/docs/en/commands/context/get-contexts/
  84. 84. @wswebcreation 51 Advanced Multiple WebView Differences More info: http://appium.io/docs/en/commands/context/get-contexts/
  85. 85. @wswebcreation Advanced 52
  86. 86. @wswebcreation Advanced 52
  87. 87. @wswebcreation Advanced 52
  88. 88. @wswebcreation Advanced 52
  89. 89. @wswebcreation Advanced 52
  90. 90. @wswebcreation Advanced 52
  91. 91. @wswebcreation Advanced 53 Multiple WebView Differences - Switch Context Steps
  92. 92. @wswebcreation Advanced 53 Multiple WebView Differences - Switch Context Steps
  93. 93. @wswebcreation Advanced 53 Multiple WebView Differences - Switch Context Steps
  94. 94. Exciting News
  95. 95. @wswebcreation Exiting News 55 Compare Scripts and Execution Time
  96. 96. @wswebcreation Exiting News 55 Compare Scripts and Execution Time
  97. 97. @wswebcreation Exiting News 55 Compare Scripts and Execution Time
  98. 98. @wswebcreation Exiting News 55 Compare Scripts and Execution Time
  99. 99. @wswebcreation Exiting News 55 Compare Scripts and Execution Time
  100. 100. Register at https://www.ministryoftesting.com/events/automating-hybrid-applications-with-appium-28-may-2021
  101. 101. @wswebcreation ● “How to Become an Appium Desktop Ninja” (6-Chapters): https://youtube.com/playlist?list=PL67l1VPxOnT4J8Kgpvi1TK0iuMwO7SJNn ● Android Remote Debugging WebViews: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/webviews ● Appium getContexts: http://appium.io/docs/en/commands/context/get-contexts/ ● Appium getContext: http://appium.io/docs/en/commands/context/get-context/ ● Appium setContext: http://appium.io/docs/en/commands/context/set-context/ ● Appium Capabilities: http://appium.io/docs/en/writing-running-appium/caps/index.html ● Appium Android ChromeDriver: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md Useful Links 57
  102. 102. Q&A
  103. 103. Let’s do this.

×