{"id":69549,"date":"2019-12-30T16:41:00","date_gmt":"2019-12-30T11:11:00","guid":{"rendered":"https:\/\/www.vskills.in\/certification\/tutorial\/?p=69549"},"modified":"2024-04-12T14:21:52","modified_gmt":"2024-04-12T08:51:52","slug":"automating-hybrid-apps","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/","title":{"rendered":"Automating Hybrid Apps"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.vskills.in\/certification\/tutorial\/mobile-testing-appium-tutorials\/\" target=\"_blank\" rel=\"noreferrer noopener\">Go back to tutorial<\/a><\/p>\n\n\n<h1><strong>Automating Hybrid Apps<\/strong><\/h1>\n<p>We will start by understanding the basics of Automating Hybrid Apps and the process involved. First of all we should understand that the core principles of Appium. As per the&nbsp; principle, you must not change your app to test it. Therefore, keeping this in mind, it is possible to test hybrid apps the same way you can with Selenium for web apps. But, given the technical complexity so that Appium knows whether you want to automate the native aspects of the app or the web views. In general, we can stay within the Selenium WebDriver protocol for everything.Therefore, after the test is in a web view context, the command set that is available is the full Selenium WebDriver API.<\/p>\n<h3><strong>How to enter the web view context?<\/strong><\/h3>\n<p>We will now elaborate the steps required to talk to a web view in your Appium test &#8211;<\/p>\n<ul>\n<li>Firstly, you must navigate to a portion of your app where a web view is active<\/li>\n<li>Secondly, you must try to retrieve the currently available contexts<\/li>\n<li>Then, it will return a list of contexts we can access, like &#8216;NATIVE_APP&#8217; or &#8216;WEBVIEW_1&#8217;<\/li>\n<li>Thereafter, you should set the context with the id of the context you want to access<\/li>\n<li>Further, this will put your Appium session into a mode where all commands are interpreted as being intended for automating the web view.<\/li>\n<li>Lastly, in order to stop automating in the web view context and go back to automating the native portion of the app. You will be required to set the context again with the native context id leave the web context and then again access the native commands.<\/li>\n<\/ul>\n<h3><strong>How to enter the web view context automatically?<\/strong><\/h3>\n<p>We will now discuss the process to enter the web view context automatically, to session start without automating the native application before entering it. This can be done by entering the web view context on session initialization by setting the autoWebview desired capability to true.<\/p>\n<h3><strong>Process of Automating hybrid iOS apps<\/strong><\/h3>\n<p>Steps involved in automating Hybrid iOS apps<\/p>\n<ul>\n<li>At first, you must interact with a web view Appium<\/li>\n<li>Secondly, you must establish a connection using a custom remote debugger.<\/li>\n<li>Thereafter, while executing against a simulator this connection is established directly as the simulator and the Appium server are on the same machine.<\/li>\n<li>Further, Appium can automate WkWebView and UIWebView elements. But, it is not currently able to handle SafariViewController elements.<\/li>\n<li>After setting your desired capabilities then start an Appium session.<\/li>\n<\/ul>\n<p><strong>Process of executing against an iOS real device <\/strong><\/p>\n<p>In the process of executing against an iOS real device, Appium is unable to access the web view directly. Therefore the connection has to be established through the USB cable. Further, to establish this connection we use the ios-webkit-debugger-proxy.&nbsp;Thereafter, you can start an Appium test session and follow the generalized instructions above.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong>Enrich your profile and become Job Ready. Practice and Prepare for&nbsp;<a href=\"https:\/\/www.vskills.in\/certification\/testing\/mobile-testing-appium-professional\">Mobile Testing (Appium) Exam<\/a>&nbsp;Now!<\/strong><\/h4>\n<h4><strong>Get expert advice and hundreds of Free Test \u2013 Try&nbsp;<a href=\"https:\/\/www.vskills.in\/practice\/index.php?route=test\/search&amp;search=appium\">Mobile Testing (Appium) Practice Questions<\/a>&nbsp;Now!<\/strong><\/h4>\n\n\n<p><a href=\"https:\/\/www.vskills.in\/certification\/tutorial\/mobile-testing-appium-tutorials\/\" target=\"_blank\" rel=\"noreferrer noopener\">Go back to tutorial<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go back to tutorial Automating Hybrid Apps We will start by understanding the basics of Automating Hybrid Apps and the process involved. First of all we should understand that the core principles of Appium. As per the&nbsp; principle, you must not change your app to test it. Therefore, keeping this in mind, it is possible&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[7891],"tags":[7977],"class_list":["post-69549","page","type-page","status-publish","hentry","category-mobile-testing-appium","tag-automating-hybrid-apps"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Automating Hybrid Apps - Mobile Testing (Appium) - Vskills Tutorial<\/title>\n<meta name=\"description\" content=\"Become a Certified Mobile Testing (Appium) Professional with expert advice and hundreds of practice test on Automating Hybrid Apps. Try Now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automating Hybrid Apps - Mobile Testing (Appium) - Vskills Tutorial\" \/>\n<meta property=\"og:description\" content=\"Become a Certified Mobile Testing (Appium) Professional with expert advice and hundreds of practice test on Automating Hybrid Apps. Try Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vskills.in\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-12T08:51:52+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/\",\"name\":\"Automating Hybrid Apps - Mobile Testing (Appium) - Vskills Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"datePublished\":\"2019-12-30T11:11:00+00:00\",\"dateModified\":\"2024-04-12T08:51:52+00:00\",\"description\":\"Become a Certified Mobile Testing (Appium) Professional with expert advice and hundreds of practice test on Automating Hybrid Apps. Try Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Automating Hybrid Apps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"name\":\"Tutorial\",\"description\":\"Vskills - A initiative in elearning and certification\",\"publisher\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\",\"name\":\"Vskills\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"contentUrl\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"width\":73,\"height\":55,\"caption\":\"Vskills\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vskills.in\/\",\"https:\/\/x.com\/vskills_in\",\"https:\/\/www.linkedin.com\/company-beta\/1371554\/\",\"https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Automating Hybrid Apps - Mobile Testing (Appium) - Vskills Tutorial","description":"Become a Certified Mobile Testing (Appium) Professional with expert advice and hundreds of practice test on Automating Hybrid Apps. Try Now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/","og_locale":"en_US","og_type":"article","og_title":"Automating Hybrid Apps - Mobile Testing (Appium) - Vskills Tutorial","og_description":"Become a Certified Mobile Testing (Appium) Professional with expert advice and hundreds of practice test on Automating Hybrid Apps. Try Now!","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T08:51:52+00:00","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/","name":"Automating Hybrid Apps - Mobile Testing (Appium) - Vskills Tutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"datePublished":"2019-12-30T11:11:00+00:00","dateModified":"2024-04-12T08:51:52+00:00","description":"Become a Certified Mobile Testing (Appium) Professional with expert advice and hundreds of practice test on Automating Hybrid Apps. Try Now!","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/automating-hybrid-apps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Automating Hybrid Apps"}]},{"@type":"WebSite","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","name":"Tutorial","description":"Vskills - A initiative in elearning and certification","publisher":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization","name":"Vskills","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","contentUrl":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","width":73,"height":55,"caption":"Vskills"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vskills.in\/","https:\/\/x.com\/vskills_in","https:\/\/www.linkedin.com\/company-beta\/1371554\/","https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw"]}]}},"_links":{"self":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/69549","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/comments?post=69549"}],"version-history":[{"count":7,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/69549\/revisions"}],"predecessor-version":[{"id":84608,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/69549\/revisions\/84608"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=69549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=69549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=69549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}