[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-detail-573296-en":53,"doc-seo-573296-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":50,"category_name":51,"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},573296,5909893218464,"dhado","https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","Locators_table_1_0_2","Reference table mapping web locators across XPath (1.0–2.0), CSS (CSS1–3), DOM access, and Selenium usage. Provides example patterns for selecting whole pages, specific elements by absolute or relative paths, tags, attributes (exact, contains, begins/ends with, word match, regex), id and name, language- and class-based selectors. Includes text and link locators plus parent/child and sibling navigation expressions to support automated browser element finding with Selenium.","XPath ● CSS ● DOM ● Selenium Rosetta Stone and Cookbook  \nSprinkled with Selenium usage tips, this is both a general-purpose set of recipes for each technology as well as a cross-reference to map from one to another. The validation suite for this reference chart ([http://bit.ly/gTd5oc](http://bit.ly/gTd5oc)) provides example usage for each recipe supported by Selenium (the majority of them) .  \n\n| Category | Recipe | XPath (1.0 – 2.0) | CSS (CSS1 – 3) | DOM | Selenium |\n| --- | --- | --- | --- | --- | --- |\n| General | Whole web page |  xpath=/html  |  css=html  |  document. documentElement  | NA |\n|  | Whole web page body | xpath=/html/body | css=body | document.body | NA |\n|  | All text nodes of web page | //text() ⌦ | NA | NA | NA |\n|  | Element \u003CE> by absolute reference | xpath=/html/body/.../.../.../E | css=body>…>…>…>E | document.body.childNodes[i]...childNodes[j] | NA |\n| Tag | Element \u003CE> by relative reference | //E | css=E | document.gEBTN('E')[0] | NA |\n|  | Second \u003CE> element anywhere on page | xpath=(//E)[2] | NA | document.gEBTN('E')[1] | NA |\n|  | Image element | //img | css=img | document.images[0] | NA |\n|  | Element \u003CE> with attribute A | //E[@A] | css=E[A] | dom=for each (e in document.gEBTN('E')) if (e.A) e􀁮 | NA |\n|  | Element \u003CE> with attribute A containing text 't' exactly | //E[@A='t'] | css=E[A='t'] 􀁯 | NA | NA |\n|  | Element \u003CE> with attribute A containing text 't' | //E[contains(@A,'t')] | css=E[A*='t'] 􀁯 | NA | NA |\n|  | Element \u003CE> whose attribute A begins with 't' | //E[starts-with(@A, 't')] | css=E[A^='t'] 􀁯 | NA | NA |\n|  | Element \u003CE> whose attribute A ends with 't' | //E[ends-with(@A, 't')] ⌦ ◄OR►\u003Cbr>//E[substring(@A, string-length(@A) -string-length('t')+1)='t'] | css=E[A$='t'] 􀁯 | NA | NA |\n|  | Element \u003CE> with attribute A containing word 'w' | //E[contains(concat('⦿', @A, '⦿'), '⦿w⦿') | css=E[A~='w'] 􀁯 | NA | NA |\n|  | Element \u003CE> with attribute A matching regex ‘r’ | //E*matches(@A, ‘r’)+ ⌦ | NA | NA | NA |\n|  | Element \u003CE1> with id I1 or element \u003CE2> with id I2 | //E1[@id=I1] | //E2[@id=I2] | css=E1\\#I1, E2\\#I2 | NA | NA |\n|  | Element \u003CE1> with id I1 or id I2 | //E1[@id=I1 or @id=I2] | css=E1\\#I1, E1\\#I2 | NA | NA |\n| Attribute􀁰 | Attribute A of element \u003CE> |  //E/@A ⌦ {Se: //E@A }  |  NA {Se: css=E@A }  |  document.gEBTN('E')[0] .getAttribute('A') ⌦   {Se: document.gEBTN('E')[0]@A }  | NA |\n|  | Attribute A of any element |  //*/@A ⌦ {Se: //*@A }  |  NA {Se: css=*@A }  | NA | NA |\n|  | Attribute A1 of element \u003CE> where attribute A2 is 't' exactly |  //E[@A2='t']/@A1 ⌦ {Se: //E[@A2='t']@A1 }  |  NA {Se: css=E[A2='t']@A1 }  | NA | NA |\n|  | Attribute A of element \u003CE> where A contains 't' |  //E[contains(@A,'t')]/@A ⌦ {Se: //E[contains(@A,'t')]@A }  |  NA {Se: css=E[A*='t']@A }  | NA | NA |\n| Id\u003Cbr>&\u003Cbr>Name | Element \u003CE> with id I | //E[@id='I'] | css=E\\#I | NA | NA |\n|  | Element with id I | //*[@id='I'] | css=\\#I | document.gEBI('I') | id=I |\n|  | Element \u003CE> with name N | //E[@name='N'] | css=E[name=N] | NA | NA |\n|  | Element with name N | //*[@name='N'] | css=[name=N] | document.getElementsByName('N')[0] | name=N |\n|  | Element with id X or, failing that, a name X | //*[@id='X' or @name='X'] | NA | NA | X ◄OR► identifier=X |\n|  | Element with name N & specified 0-based index ‘v’ | //*[@name='N'][v+1] | css=[name=N]:nth-child(v+1) | NA | name=N index=v |\n|  | Element with name N & specified value ‘v’ | //*[@name='N'][@value='v'] | css=[name=N][value='v’] | NA | name=N value=v |\n| Lang\u003Cbr>&\u003Cbr>Class | Element \u003CE> is explicitly in language L or subcode | //E[@lang='L' or starts-with(@lang, concat('L', '-'))] | css=E[lang|=L] | NA | NA |\n|  | Element \u003CE> is in language L or subcode (possibly inherited) | NA | css=E:lang(L) | NA | NA |\n|  | Element with a class C | //*[contains(concat('⦿', @class, ' ⦿'), ' ⦿C⦿')] | css=.C | document.getElementsByClassName('C')[0] | NA |\n|  | Element \u003CE> with a class C | //E[contains(concat('⦿', @class, ' ⦿'), '⦿C⦿')] | css=E. C | NA | NA |\n| Text\u003Cbr>&\u003Cbr>","cbCait6wV7UPyjpy","https://ap.wps.com/l/cbCait6wV7UPyjpy","pdf",1445150,4,"English","en",105,"","[{\"question\":\"What locator types does the table map between?\",\"answer\":\"It cross-references locators across XPath (1.0–2.0), CSS (CSS1–3), DOM access, and Selenium usage, using recipes for the same selection intent in multiple technologies.\"},{\"question\":\"How does the table help you select elements by attributes in XPath and CSS?\",\"answer\":\"It lists patterns for attributes with exact matches, contains, starts-with, ends-with, word matches, and regex-style matching, paired with equivalent CSS selector forms where applicable.\"},{\"question\":\"What does the table provide for navigating parent, child, and sibling relationships?\",\"answer\":\"It includes XPath expressions and corresponding CSS/DOM/Selenium patterns for first/last children, second child, second-to-last child, and relations like parent of an element and descendant selection from an id.\"}]","Locators_table_1_0_2 | PDF",1791936762,{"code":4,"msg":75,"data":76},"ok",{"site_id":69,"language":68,"slug":77,"title":59,"keywords":70,"description":60,"schema_data":78,"social_meta":133,"head_meta":135,"extra_data":137,"updated_unix":138},"locators_table_1_0_2",{"@graph":79,"@context":132},[80,95,115],{"@type":81,"itemListElement":82},"BreadcrumbList",[83,87,90,93],{"item":84,"name":85,"@type":86,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":88,"name":10,"@type":86,"position":89},"https://docshare.wps.com/template/",2,{"item":91,"name":51,"@type":86,"position":92},"https://docshare.wps.com/template/general/",3,{"item":94,"name":59,"@type":86,"position":66},"https://docshare.wps.com/template/locators_table_1_0_2/573296/",{"url":94,"name":59,"@type":96,"image":97,"author":102,"headline":59,"publisher":104,"fileFormat":107,"inLanguage":68,"description":60,"dateModified":108,"datePublished":109,"encodingFormat":107,"isAccessibleForFree":110,"interactionStatistic":111},"DigitalDocument",{"url":98,"@type":99,"width":100,"height":101},"https://docshare.wps.com/thumbnails/locators_table_1_0_2/573296.png","ImageObject",442,249,{"name":57,"@type":103},"Person",{"url":84,"name":105,"@type":106},"DocShare","Organization","application/pdf","2026-10-19","2026-10-14",true,{"@type":112,"interactionType":113,"userInteractionCount":66},"InteractionCounter",{"@type":114},"ViewAction",{"@type":116,"mainEntity":117},"FAQPage",[118,124,128],{"name":119,"@type":120,"acceptedAnswer":121},"What locator types does the table map between?","Question",{"text":122,"@type":123},"It cross-references locators across XPath (1.0–2.0), CSS (CSS1–3), DOM access, and Selenium usage, using recipes for the same selection intent in multiple technologies.","Answer",{"name":125,"@type":120,"acceptedAnswer":126},"How does the table help you select elements by attributes in XPath and CSS?",{"text":127,"@type":123},"It lists patterns for attributes with exact matches, contains, starts-with, ends-with, word matches, and regex-style matching, paired with equivalent CSS selector forms where applicable.",{"name":129,"@type":120,"acceptedAnswer":130},"What does the table provide for navigating parent, child, and sibling relationships?",{"text":131,"@type":123},"It includes XPath expressions and corresponding CSS/DOM/Selenium patterns for first/last children, second child, second-to-last child, and relations like parent of an element and descendant selection from an id.","https://schema.org",{"og:url":94,"og:type":134,"og:title":59,"og:site_name":105,"og:description":60},"article",{"robots":136,"canonical":94},"index,follow",{"doc_id":55,"site_id":69},1792090581]