{"id":69569,"date":"2019-12-30T16:45:24","date_gmt":"2019-12-30T11:15:24","guid":{"rendered":"https:\/\/www.vskills.in\/certification\/tutorial\/?p=69569"},"modified":"2024-04-12T14:21:54","modified_gmt":"2024-04-12T08:51:54","slug":"ios-pasteboard","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/","title":{"rendered":"iOS Pasteboard"},"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>iOS Pasteboard<\/strong><\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.braintechnosys.com\/blog\/wp-content\/uploads\/2018\/10\/Appium-Brain-Technosys.png\" alt=\"Related image\" width=\"518\" height=\"297\"><\/p>\n<p>We will be learning about iOS Pasteboard with different types of functions involved. Also, there is a possibility in Appium to set the content of the iOS Simulator pasteboard and read the content from there, if needed. Therefore, each Simulator maintains its own pasteboard. Such that, this feature is only available since Xcode SDK 8.1. But, unfortunately, real devices don&#8217;t provide such features.<\/p>\n<h3><strong>iOS Pasteboard &#8211; mobile: setPasteboard<\/strong><\/h3>\n<p>This command sets the content of Simulator&#8217;s pasteboard to the particular string provided as an argument. Also, it is possible to customize the encoding of the given string.<\/p>\n<p><em><strong>Supported arguments<\/strong><\/em><\/p>\n<ul>\n<li>content: The content of the pasteboard. The previous content is going to be overridden. The parameter is mandatory<\/li>\n<li>encoding: Encoding of the given content. UTF-8 by default.<\/li>\n<\/ul>\n<p>Usage examples<\/p>\n<p>\/\/ Java<\/p>\n<p>JavascriptExecutor js = (JavascriptExecutor) driver;<\/p>\n<p>Map&lt;String, Object&gt; args = new HashMap&lt;&gt;();<\/p>\n<p>args.put(&#8220;content&#8221;, new String(Files.readAllBytes(new File(&#8220;\/etc\/passwd&#8221;).toPath()), Charset.forName(&#8220;latin-1&#8221;)));<\/p>\n<p>js.executeScript(&#8220;mobile: setPasteboard&#8221;, args);<\/p>\n<h3><strong>mobile: getPasteboard<\/strong><\/h3>\n<p>This command is used to get the current content of Simulator&#8217;s pasteboard as a string. Also, it is possible to customize the encoding of the received string.<\/p>\n<p><em><strong>Supported arguments<\/strong><\/em><\/p>\n<ul>\n<li>encoding: Encoding of the received pasteboard content. UTF-8 by default.<\/li>\n<\/ul>\n<p>Usage examples<\/p>\n<p># Python<\/p>\n<p>content = driver.execute_script(&#8216;mobile: getPasteboard&#8217;, {&#8216;encoding&#8217;: &#8216;shift-jis&#8217;});<\/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 iOS Pasteboard We will be learning about iOS Pasteboard with different types of functions involved. Also, there is a possibility in Appium to set the content of the iOS Simulator pasteboard and read the content from there, if needed. Therefore, each Simulator maintains its own pasteboard. Such that, this feature is&#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":[7987],"class_list":["post-69569","page","type-page","status-publish","hentry","category-mobile-testing-appium","tag-ios-pasteboard"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>iOS Pasteboard - Mobile Testing - VskillsTutorial<\/title>\n<meta name=\"description\" content=\"Get ready to learn and explore about iOS Pasteboard with hundreds of real time practice exam . Become Certified Mobile testing Professional 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\/ios-pasteboard\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"iOS Pasteboard - Mobile Testing - VskillsTutorial\" \/>\n<meta property=\"og:description\" content=\"Get ready to learn and explore about iOS Pasteboard with hundreds of real time practice exam . Become Certified Mobile testing Professional Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/\" \/>\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:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.braintechnosys.com\/blog\/wp-content\/uploads\/2018\/10\/Appium-Brain-Technosys.png\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/\",\"name\":\"iOS Pasteboard - Mobile Testing - VskillsTutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.braintechnosys.com\/blog\/wp-content\/uploads\/2018\/10\/Appium-Brain-Technosys.png\",\"datePublished\":\"2019-12-30T11:15:24+00:00\",\"dateModified\":\"2024-04-12T08:51:54+00:00\",\"description\":\"Get ready to learn and explore about iOS Pasteboard with hundreds of real time practice exam . Become Certified Mobile testing Professional Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/#primaryimage\",\"url\":\"https:\/\/www.braintechnosys.com\/blog\/wp-content\/uploads\/2018\/10\/Appium-Brain-Technosys.png\",\"contentUrl\":\"https:\/\/www.braintechnosys.com\/blog\/wp-content\/uploads\/2018\/10\/Appium-Brain-Technosys.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"iOS Pasteboard\"}]},{\"@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":"iOS Pasteboard - Mobile Testing - VskillsTutorial","description":"Get ready to learn and explore about iOS Pasteboard with hundreds of real time practice exam . Become Certified Mobile testing Professional 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\/ios-pasteboard\/","og_locale":"en_US","og_type":"article","og_title":"iOS Pasteboard - Mobile Testing - VskillsTutorial","og_description":"Get ready to learn and explore about iOS Pasteboard with hundreds of real time practice exam . Become Certified Mobile testing Professional Now!","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T08:51:54+00:00","og_image":[{"url":"https:\/\/www.braintechnosys.com\/blog\/wp-content\/uploads\/2018\/10\/Appium-Brain-Technosys.png","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/","name":"iOS Pasteboard - Mobile Testing - VskillsTutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/#primaryimage"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/#primaryimage"},"thumbnailUrl":"https:\/\/www.braintechnosys.com\/blog\/wp-content\/uploads\/2018\/10\/Appium-Brain-Technosys.png","datePublished":"2019-12-30T11:15:24+00:00","dateModified":"2024-04-12T08:51:54+00:00","description":"Get ready to learn and explore about iOS Pasteboard with hundreds of real time practice exam . Become Certified Mobile testing Professional Now!","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/#primaryimage","url":"https:\/\/www.braintechnosys.com\/blog\/wp-content\/uploads\/2018\/10\/Appium-Brain-Technosys.png","contentUrl":"https:\/\/www.braintechnosys.com\/blog\/wp-content\/uploads\/2018\/10\/Appium-Brain-Technosys.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/ios-pasteboard\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"iOS Pasteboard"}]},{"@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\/69569","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=69569"}],"version-history":[{"count":5,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/69569\/revisions"}],"predecessor-version":[{"id":84618,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/69569\/revisions\/84618"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=69569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=69569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=69569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}