[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-detail-573295-en":53,"doc-seo-573295-105":74},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":5,"data":54},{"doc_id":55,"user_id":56,"nickname":57,"user_avatar":58,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":60,"doc_content":61,"file_id":62,"file_url":63,"file_type":64,"file_size":65,"view_count":66,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":9,"language":67,"language_code":68,"site_id":69,"html_lang":68,"table_of_contents":70,"faqs":71,"seo_title":72,"seo_description":60,"update_tm":73,"read_time":4},573295,962090893677,"mieayamfan","https://ap-avatar.wpscdn.com/davatar_3d24733baf745e90a7e4bdd5f77d97b2","XPATH Cheat Sheet - read online free","XPATH Cheat Sheet provides practical, copy-ready XPath locators for finding common web elements in HTML pages. It lists selectors targeting INPUT, BUTTON, DIV, SPAN, and A elements using attribute matches (id, name, aria-label, data-id, class, href), text extraction, and structural relationships like direct children. Examples include predicates, starts-with/contains checks, negation, normalization of class values, indexing (e.g., the second or last matching DIV), and count aggregation to measure matched elements.","XPATH Cheat Sheet  \nby Alex Siminiuc (alexsiminiuc)[via](via cheatography.com/23299/cs/5110/)[ cheatography.com/23299/cs/5110/](via cheatography.com/23299/cs/5110/)  \nXPATH locators  \n\n| You can test all locator examples using Firebug and Firepath on the following page: [https://vpl.bibliocommons.com/search?q=java&t=k‐](https://vpl.bibliocommons.com/search?q=java&t=k‐)[ ](https://vpl.bibliocommons.com/search?q=java&t=k‐)eyword\u003Cbr>See more articles about XPATH on my blog, [http://test-able.blog‐](http://test-able.blog‐)[ ](http://test-able.blog‐)[spot.ca](spot.ca). |\n| --- |\n| //input |\n| finds all INPUT elements that are included in the web page |\n| //input[@aria-label='Search Catalogue'] |\n| finds all INPUT elements that have an ARIA-LABEL attribute with the\u003Cbr>\"Search Catalogue\" value |\n| //button[@data-id='sortSelector']/span |\n| 1. finds all BUTTON elements that have a DATA-ID attribute with the \"sortSelector\" value\u003Cbr>2. for each element from the BUTTON list , find the SPAN elements that are direct children |\n| (//div[@class='listItem clearfix '])[2]//span |\n| 1. finds the DIV elements that have the CLASS attribute's value equal to \"listItem clearfix\" |\n| 2. gets the second element from the DIV elements list |\n| 3. finds all SPAN elements (direct children or not) that are inside of the second DIV |\n| //input[@id='globalQuery' and @name='q'] |\n| finds all INPUT elements that\u003Cbr>1. have an ID attribute with the \"globalQuery\" value\u003Cbr>2. have a NAME attribute with the \"q\" value |\n| //a[contains(@href, 'show_circulation')] |\n| finds all A elements that have \"show_circulation\" included in the value of the HREF attribute |\n| //a[starts-with(@href, '/item/show_circulation')] |\n| finds all A elements that have the HREF attribute's value starting with\"/item/show_circulation\" |\n| //input[not(@name='q')] |\n\nfinds all INPUT elements that have the NAME attribute's value  \ndifferent than \"q\"  \nMore XPATH locators  \n\n| You can test all locator examples using Firebug and Firepath on the following page: [https://vpl.bibliocommons.com/search?q=java&t=k‐](https://vpl.bibliocommons.com/search?q=java&t=k‐)[ ](https://vpl.bibliocommons.com/search?q=java&t=k‐)eyword |\n| --- |\n| (//div[@class='listItem clearfix '])[3] |\n| 1. finds all DIV elements that have the CLASS attribute's value equal to\u003Cbr>\"listItem clearfix\"\u003Cbr>2. selects the 3rd DIV element from the list of DIV elements |\n| (//div[@class='listItem clearfix '])[last()] |\n| 1. finds all DIV elements that have the CLASS attribute's value equal to\u003Cbr>\"listItem clearfix\"\u003Cbr>[2. select](2. select) the last DIV element from the list of DIV elements |\n| count(//div[@class='listItem clearfix ']) |\n| provides the count of all DIV elements that have the CLASS attrib‐ ute's value equal to \"listItem clearfix\" |\n| //a[@class='extendSearch']/@testid |\n| 1. finds the A elements that have the CLASS attribute's value equal to\u003Cbr>\"extendSearch\"\u003Cbr>2. gets the value of the TESTID attribute for the A elements |\n| //a[@class='extendSearch']/text() |\n| 1. finds the A elements that have the CLASS attribute's value equal to \"extendSearch\"\u003Cbr>2. get the value of the A elements |\n| //div[normalize-space(@class)='listItem clearfix'] |\n| 1. finds the DIV elements that have a CLASS attribute\u003Cbr>2. removes all spaces from the value of the CLASS attribute\u003Cbr>2. finds the DIV elements that have the value of the CLASS attribute (excluding spaces) equal to \"listItem clearfix\" |\n| //a[string-length(@href) > 70] |\n\nfinds all A elements that have the HREF attribute value length greater than 70 characters  \nBy Alex Siminiuc (alexsiminiuc)  \n[cheatography.com/alexsiminiuc/](cheatography.com/alexsiminiuc/)[ ](cheatography.com/alexsiminiuc/)[test-able.blogspot.ca](test-able.blogspot.ca)  \nPublished 4th September, 2015. Last updated 12th May , 2016. Page 1 of 1.  \nSponsored by ApolloPad.com Everyone has a novel in them. Finish Yours!  \n[https://apollopad.com](https://apollopad.com)","cbCailKpD5HImJxa","https://ap.wps.com/l/cbCailKpD5HImJxa","pdf",42438,3,"English","en",105,"# XPATH locators\n## More XPATH locators","[{\"question\":\"How do I select all INPUT elements on a page using this sheet?\",\"answer\":\"Use the locator `//input` to find all INPUT elements included in the web page.\"},{\"question\":\"How can I find an INPUT element with a specific ARIA label and value?\",\"answer\":\"Use `//input[@aria-label='Search Catalogue']`, which matches INPUT elements whose ARIA-LABEL attribute equals `Search Catalogue`.\"},{\"question\":\"How do I choose the second or last matching DIV elements by class?\",\"answer\":\"For the second match, use `(//div[@class='listItem clearfix '])[2]//span`; for the last match of the same class, use `(//div[@class='listItem clearfix '])[last()]`.\"}]","XPATH Cheat Sheet - read online free | PDF",1791936761,{"code":4,"msg":75,"data":76},"ok",{"site_id":69,"language":68,"slug":77,"title":59,"keywords":78,"description":60,"schema_data":79,"social_meta":134,"head_meta":136,"extra_data":138,"updated_unix":139},"xpath-cheat-sheet-read-online-free","",{"@graph":80,"@context":133},[81,96,116],{"@type":82,"itemListElement":83},"BreadcrumbList",[84,88,91,93],{"item":85,"name":86,"@type":87,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":89,"name":10,"@type":87,"position":90},"https://docshare.wps.com/template/",2,{"item":92,"name":11,"@type":87,"position":66},"https://docshare.wps.com/template/presentations/",{"item":94,"name":59,"@type":87,"position":95},"https://docshare.wps.com/template/xpath-cheat-sheet-read-online-free/573295/",4,{"url":94,"name":59,"@type":97,"image":98,"author":103,"headline":59,"publisher":105,"fileFormat":108,"inLanguage":68,"description":60,"dateModified":109,"datePublished":110,"encodingFormat":108,"isAccessibleForFree":111,"interactionStatistic":112},"DigitalDocument",{"url":99,"@type":100,"width":101,"height":102},"https://docshare.wps.com/thumbnails/xpath-cheat-sheet-read-online-free/573295.png","ImageObject",442,249,{"name":57,"@type":104},"Person",{"url":85,"name":106,"@type":107},"DocShare","Organization","application/pdf","2026-10-19","2026-10-14",true,{"@type":113,"interactionType":114,"userInteractionCount":66},"InteractionCounter",{"@type":115},"ViewAction",{"@type":117,"mainEntity":118},"FAQPage",[119,125,129],{"name":120,"@type":121,"acceptedAnswer":122},"How do I select all INPUT elements on a page using this sheet?","Question",{"text":123,"@type":124},"Use the locator `//input` to find all INPUT elements included in the web page.","Answer",{"name":126,"@type":121,"acceptedAnswer":127},"How can I find an INPUT element with a specific ARIA label and value?",{"text":128,"@type":124},"Use `//input[@aria-label='Search Catalogue']`, which matches INPUT elements whose ARIA-LABEL attribute equals `Search Catalogue`.",{"name":130,"@type":121,"acceptedAnswer":131},"How do I choose the second or last matching DIV elements by class?",{"text":132,"@type":124},"For the second match, use `(//div[@class='listItem clearfix '])[2]//span`; for the last match of the same class, use `(//div[@class='listItem clearfix '])[last()]`.","https://schema.org",{"og:url":94,"og:type":135,"og:title":59,"og:site_name":106,"og:description":60},"article",{"robots":137,"canonical":94},"index,follow",{"doc_id":55,"site_id":69},1792033697]