{"id":69539,"date":"2019-12-30T16:39:01","date_gmt":"2019-12-30T11:09:01","guid":{"rendered":"https:\/\/www.vskills.in\/certification\/tutorial\/?p=69539"},"modified":"2024-04-12T14:21:52","modified_gmt":"2024-04-12T08:51:52","slug":"finding-and-interacting-with-elements","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/","title":{"rendered":"Finding and Interacting with Elements"},"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>Finding and Interacting with Elements<\/strong><\/h1>\n<p>Get ready to learn more about Finding and Interacting with elements. Let us begin by understanding&nbsp; various strategies.<\/p>\n<p>In order to learn more about the process of finding and interacting with elements, we start by understanding WebDriver locator strategies. In this case, Appium supports a subset of the WebDriver locator strategies including &#8211;<\/p>\n<ul>\n<li>First, find by &#8220;class&#8221; (i.e., ui component type)<\/li>\n<li>Second, find by &#8220;xpath&#8221; (i.e., an abstract representation of a path to an element, with certain constraints)<\/li>\n<\/ul>\n<h3><strong>Selector Strategies<\/strong><\/h3>\n<p>Some of the popular selector strategies include &#8211;<\/p>\n<ul>\n<li>Accessibility ID<\/li>\n<li>Class name<\/li>\n<li>ID<\/li>\n<li>Name<\/li>\n<li>XPath<\/li>\n<li>Image<\/li>\n<li>Android UiAutomator (UiAutomator2 only)<\/li>\n<li>Android View Tag (Espresso only)<\/li>\n<li>Android Data Matcher (Espresso only)<\/li>\n<li>IOS UIAutomation<\/li>\n<\/ul>\n<h3><strong>Mobile JSON Wire Protocol locator strategies<\/strong><\/h3>\n<p>Further, Appium additionally supports some of the Mobile JSON Wire Protocol locator strategies &#8211;<\/p>\n<ul>\n<li>-ios predicate string : It is a string corresponding to a recursive element search using the iOS Predicate<\/li>\n<li>-android uiautomator: It is a string corresponding to a recursive element search using the UiAutomator Api (Android-only)<\/li>\n<li>-android datamatcher: It a string corresponding to an Espresso DataMatcher json (Android-only)<\/li>\n<li>accessibility id: It is a string corresponding to a recursive element search using the Id\/Name that the native Accessibility options utilize.<\/li>\n<\/ul>\n<p>Additional experimental locator strategies include,<\/p>\n<ul>\n<li>-image: a string corresponding to a base64-encoded version of an image which should be used by Appium as a template to find a matching screen region, which can then be tapped as if it were an element.<\/li>\n<li>-custom: a string which will be sent to an element finding plugin registered via the customFindModules capability.<\/li>\n<\/ul>\n<h3><strong>Using Appium Desktop<\/strong><\/h3>\n<p>Appium offers a neat tool that allows you to find the the elements. Together, with Appium Desktop you can find any element and its locators by either clicking the element on the screenshot image, or locating it in the source tree. Additionally,&nbsp;Appium Desktop has a simple layout, complete with a source tree, a screenshot, and record and refresh buttons, and interaction tools.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-139705\" src=\"https:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2019\/07\/image047-1.png\" alt=\"\" width=\"620\" height=\"352\"><\/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 Finding and Interacting with Elements Get ready to learn more about Finding and Interacting with elements. Let us begin by understanding&nbsp; various strategies. In order to learn more about the process of finding and interacting with elements, we start by understanding WebDriver locator strategies. In this case, Appium supports a subset&#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":[7972],"class_list":["post-69539","page","type-page","status-publish","hentry","category-mobile-testing-appium","tag-finding-and-interacting-with-elements"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Finding and Interacting with Elements (Appium) - VskillsTutorial<\/title>\n<meta name=\"description\" content=\"Upgrade your skills as a Certified Mobile Testing Professional with advanced skills. Learn about Interacting with elements with hundreds of practice test !\" \/>\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\/finding-and-interacting-with-elements\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Finding and Interacting with Elements (Appium) - VskillsTutorial\" \/>\n<meta property=\"og:description\" content=\"Upgrade your skills as a Certified Mobile Testing Professional with advanced skills. Learn about Interacting with elements with hundreds of practice test !\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/\" \/>\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 property=\"og:image\" content=\"https:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2019\/07\/image047-1.png\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 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\/finding-and-interacting-with-elements\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/\",\"name\":\"Finding and Interacting with Elements (Appium) - VskillsTutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2019\/07\/image047-1.png\",\"datePublished\":\"2019-12-30T11:09:01+00:00\",\"dateModified\":\"2024-04-12T08:51:52+00:00\",\"description\":\"Upgrade your skills as a Certified Mobile Testing Professional with advanced skills. Learn about Interacting with elements with hundreds of practice test !\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/#primaryimage\",\"url\":\"https:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2019\/07\/image047-1.png\",\"contentUrl\":\"https:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2019\/07\/image047-1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Finding and Interacting with Elements\"}]},{\"@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":"Finding and Interacting with Elements (Appium) - VskillsTutorial","description":"Upgrade your skills as a Certified Mobile Testing Professional with advanced skills. Learn about Interacting with elements with hundreds of practice test !","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\/finding-and-interacting-with-elements\/","og_locale":"en_US","og_type":"article","og_title":"Finding and Interacting with Elements (Appium) - VskillsTutorial","og_description":"Upgrade your skills as a Certified Mobile Testing Professional with advanced skills. Learn about Interacting with elements with hundreds of practice test !","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T08:51:52+00:00","og_image":[{"url":"https:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2019\/07\/image047-1.png","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/","name":"Finding and Interacting with Elements (Appium) - VskillsTutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/#primaryimage"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2019\/07\/image047-1.png","datePublished":"2019-12-30T11:09:01+00:00","dateModified":"2024-04-12T08:51:52+00:00","description":"Upgrade your skills as a Certified Mobile Testing Professional with advanced skills. Learn about Interacting with elements with hundreds of practice test !","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/#primaryimage","url":"https:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2019\/07\/image047-1.png","contentUrl":"https:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2019\/07\/image047-1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/finding-and-interacting-with-elements\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Finding and Interacting with Elements"}]},{"@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\/69539","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=69539"}],"version-history":[{"count":5,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/69539\/revisions"}],"predecessor-version":[{"id":84592,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/69539\/revisions\/84592"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=69539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=69539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=69539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}