PageSourceSearch

https://docs-production-katalon.netlify.app/assets/js/a8aea14a.27532541.js

js docs-production-katalon.netlify.app collected 2026-10-03 10:43:09 UTC 23,924 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkKatalon_Docs=self.webpackChunkKatalon_Docs||[]).push([[13201],{17720:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"test-objects/web-test-objects/manage-web-test-objects","title":"Manage Web test objects","description":"In Katalon Studio, a test object is designed to follow the Page Object Model (POM) pattern to represent the structure of an application under test (AUT). A test object has identification properties and selection methods.","source":"@site/docs/katalon-studio/test-objects/web-test-objects/manage-web-test-objects.md","sourceDirName":"test-objects/web-test-objects","slug":"/test-objects/web-test-objects/manage-web-test-objects","permalink":"/katalon-studio/test-objects/web-test-objects/manage-web-test-objects","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedAt":1759828866000,"frontMatter":{"title":"Manage Web test objects"},"sidebar":"katalon-studio","previous":{"title":"Find the locator of a mobile application element","permalink":"/katalon-studio/test-objects/mobile-test-objects/find-the-locator-of-a-mobile-application-element"},"next":{"title":"Selection methods for Web objects","permalink":"/katalon-studio/test-objects/web-test-objects/selection-methods-for-web-objects"}}');var c=s(74848),n=s(28453),l=s(86025);const o={title:"Manage Web test objects"},r=void 0,i={},d=[{value:'<a class="anchor_top_offset"></a>Create Web objects manually',id:"create-web-objects-manually",level:2},{value:'<a class="anchor_top_offset"></a>Create object locator',id:"create-object-locator",level:3},{value:'<a class="anchor_top_offset"></a>Manage parent object',id:"manage-parent-object",level:2},{value:'<a class="anchor_top_offset"></a>Create Web objects in script view',id:"create-web-objects-in-script-view",level:2},{value:'<a class="anchor_top_offset"></a>Verify Web test object',id:"verify-web-test-object",level:2}];function h(e){const t={code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,n.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["In ",(0,c.jsx)("span",{className:"ph",children:"Katalon Studio"}),", a test object is designed to follow the Page Object Model (POM) pattern to represent the structure of an application under test (AUT). A test object has identification properties and selection methods."]}),"\n",(0,c.jsxs)("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["In this document, you'll learn:",(0,c.jsxs)("ul",{className:"ul",children:[(0,c.jsx)("li",{className:"li",children:"How to create Web  objects manually"}),(0,c.jsxs)("li",{className:"li",children:[" How to create Web objects in ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Script"})," view"]}),(0,c.jsx)("li",{className:"li",children:"How to validate Web  objects"})]})]}),"\n",(0,c.jsxs)(t.h2,{id:"create-web-objects-manually",children:[(0,c.jsx)("a",{id:"id_1",class:"anchor_top_offset"}),"Create Web objects manually"]}),"\n",(0,c.jsx)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:"You can manually create a Web test object in two ways:"}),"\n",(0,c.jsxs)("ul",{xmlns:"http://www.w3.org/1999/xhtml",className:"ul",children:[(0,c.jsxs)("li",{className:"li",children:["From the main menu, select ",(0,c.jsx)("span",{className:"ph uicontrol",children:"File"})," > ",(0,c.jsx)("span",{className:"ph uicontrol",children:"New"})," > ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Test Object"})]}),(0,c.jsxs)("li",{className:"li",children:["Or, right-click on ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Object Repository"})," and select ",(0,c.jsx)("span",{className:"ph uicontrol",children:"New"})," > ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Test Object"})]})]}),"\n",(0,c.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["In the displayed ",(0,c.jsx)("span",{className:"ph uicontrol",children:"New Test Object"})," dialog, provide a name for the new test object, then click ",(0,c.jsx)("span",{className:"ph uicontrol",children:"OK"}),". Test objects created manually are stored under ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Object Repository"}),"."]}),"\n",(0,c.jsxs)("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["Alternatively, we recommend using Record and Spy utilities to create test objects. Doing so, the object locators are captured automatically. See:",(0,c.jsxs)("ul",{className:"ul",children:[(0,c.jsx)("li",{className:"li",children:(0,c.jsx)("p",{className:"p",children:(0,c.jsx)("a",{className:"xref",href:"/katalon-studio/record-and-spy/webui-record-and-spy-utilities/spy-web-utility-in-katalon-studio",children:"Web Spy Utility"})})}),(0,c.jsx)("li",{className:"li",children:(0,c.jsx)("p",{className:"p",children:(0,c.jsx)("a",{className:"xref",href:"/katalon-studio/record-and-spy/webui-record-and-spy-utilities/record-web-utility-in-katalon-studio",children:"Web Record Utility"})})})]})]}),"\n",(0,c.jsxs)(t.h3,{id:"create-object-locator",children:[(0,c.jsx)("a",{id:"task-9958",class:"anchor_top_offset"}),"Create object locator"]}),"\n",(0,c.jsxs)("section",{xmlns:"http://www.w3.org/1999/xhtml",className:"section context",children:[(0,c.jsxs)("p",{className:"p",children:[(0,c.jsx)("span",{className:"ph",children:"Katalon Studio"})," supports the following selection methods: XPath, Attributes, CSS, Image, and Smart Locator. See: ",(0,c.jsx)("a",{className:"xref",href:"/katalon-studio/test-objects/web-test-objects/selection-methods-for-web-objects",children:"Selection methods for Web objects"}),"."]}),(0,c.jsxs)("p",{className:"p",children:["When you create a test object manually, the ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Attributes"})," (or properties) selection method is selected by default. "]})," ",(0,c.jsxs)("p",{className:"p",children:["This section shows you how to add object properties and generate object locator with the ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Attributes"})," selection method."]})]}),"\n",(0,c.jsxs)("ol",{xmlns:"http://www.w3.org/1999/xhtml",className:"ol steps",children:[(0,c.jsx)("li",{className:"li step stepexpand",children:(0,c.jsxs)("span",{className:"ph cmd",children:["Open an test object. In the ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Test Object Editor"}),", make sure ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Attributes"})," is selected as the default selection method."]})}),(0,c.jsx)("li",{className:"li step stepexpand",children:(0,c.jsxs)("span",{className:"ph cmd",children:["In the ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Object's Properties"})," section, click ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Add"}),"."]})}),(0,c.jsxs)("li",{className:"li step stepexpand",children:[(0,c.jsxs)("span",{className:"ph cmd",children:["In the displayed ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Add property"})," dialog, specify the required information:"]}),(0,c.jsxs)("div",{className:"itemgroup info",children:[(0,c.jsx)("img",{className:"image",width:400,src:(0,l.Ay)("/37de2950-5ec8-11ed-a602-0242cfbc79b5/ks-add-property-dialog.png"),alt:"Add property dialog"}),(0,c.jsxs)("ul",{className:"ul",children:[(0,c.jsxs)("li",{className:"li",children:[(0,c.jsx)("span",{className:"ph uicontrol",children:"Name"}),": The object property's name. You can select one of the provided options (class, css, id, name, title, xpath) or enter a name manually."]}),(0,c.jsxs)("li",{className:"li",children:[(0,c.jsx)("span",{className:"ph uicontrol",children:"Match condition"}),": The condition is used for detecting the target object during execution."]}),(0,c.jsxs)("li",{className:"li",children:[(0,c.jsx)("span",{className:"ph uicontrol",children:"Value"}),": The value to complete a match condition. The new property is added to the properties list as configured above. You can also change the properties' values here."]})]}),(0,c.jsxs)("p",{className:"p",children:["For example, we name the property ",(0,c.jsx)("code",{className:"ph codeph",children:"id"})," with value as ",(0,c.jsx)("code",{className:"ph codeph",children:"btn-login"}),"."]})]})]}),(0,c.jsxs)("li",{className:"li step stepexpand",children:[(0,c.jsxs)("span",{className:"ph cmd",children:["Click ",(0,c.jsx)("span",{className:"ph uicontrol",children:"OK"})," when you're done. The property is added to the table accordingly."]}),(0,c.jsx)("div",{className:"itemgroup info",children:"You can add multiple properties to the table, but each property must have a unique name."})]}),(0,c.jsxs)("li",{className:"li step stepexpand",children:[(0,c.jsxs)("span",{className:"ph cmd",children:["Select the box(es) in the ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Detect object by?"})," column of the ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Object's Properties"})," table to create the locator for this method."]}),(0,c.jsx)("div",{className:"itemgroup info",children:(0,c.jsx)("img",{className:"image",width:400,src:(0,l.Ay)("/5628fbc0-d5fe-11ee-9719-0242c7a41fd4/KS_added_object_properties.png"),alt:"Object view with added properties"})})]})]}),"\n",(0,c.jsxs)("section",{xmlns:"http://www.w3.org/1999/xhtml",className:"section result",children:[(0,c.jsx)("span",{className:"ph",children:"Katalon Studio"})," generates a locator that combine the selected object properties."]}),"\n",(0,c.jsxs)(t.h2,{id:"manage-parent-object",children:[(0,c.jsx)("a",{id:"id_4",class:"anchor_top_offset"}),"Manage parent object"]}),"\n",(0,c.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["Many web applications rendering elements in an ",(0,c.jsx)("a",{className:"xref j-external-link",href:"https://www.w3schools.com/tags/tag_iframe.asp",target:"_blank",children:"iframe"}),". Therefore, you have to tell your script how to traverse a website's iframes and select the correct iframe where the text and its object are present. To do so, you have to use the ",(0,c.jsx)("a",{className:"xref j-external-link",href:"http://docs.katalon.com/display/KD/%5BWebUI%5D+Switch+To+Frame",target:"_blank",children:"Switch To Frame"})," keyword before interacting with the elements."]}),"\n",(0,c.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:[(0,c.jsx)("span",{className:"ph",children:"Katalon Studio"})," supports an ability to define parent iframe object within the test object view. You only need to select the ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Parent iframe"})," option, and the execution automatically switches to that iframe."]}),"\n",(0,c.jsx)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:(0,c.jsx)("img",{className:"image",width:500,src:(0,l.Ay)("/561f5ed0-d5fe-11ee-9719-0242c7a41fd4/KS_object_parent_iframe.png"),alt:"Object view with Parent iframe specified"})}),"\n",(0,c.jsxs)(t.h2,{id:"create-web-objects-in-script-view",children:[(0,c.jsx)("a",{id:"task-5750",class:"anchor_top_offset"}),"Create Web objects in script view"]}),"\n",(0,c.jsxs)("section",{xmlns:"http://www.w3.org/1999/xhtml",className:"section context",children:["You can create Web objects programmatically in the ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Script View"})," of a test case. This approach allows you to create test objects in runtime.",(0,c.jsx)("p",{className:"p",children:"The following classes and methods might be useful when working with test objects:"}),(0,c.jsxs)("table",{className:"table anchor_top_offset",id:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3",children:[(0,c.jsx)("caption",{}),(0,c.jsxs)("colgroup",{children:[(0,c.jsx)("col",{style:{width:"20%"}}),(0,c.jsx)("col",{style:{width:"40%"}}),(0,c.jsx)("col",{style:{width:"40%"}})]}),(0,c.jsx)("thead",{className:"thead",children:(0,c.jsxs)("tr",{className:!0,children:[(0,c.jsx)("th",{className:"entry anchor_top_offset",id:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1",children:"Class"}),(0,c.jsx)("th",{className:"entry anchor_top_offset",id:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2",children:"Method"}),(0,c.jsx)("th",{className:"entry anchor_top_offset",id:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3",children:"Description"})]})}),(0,c.jsxs)("tbody",{className:"tbody",children:[(0,c.jsxs)("tr",{className:!0,children:[(0,c.jsx)("td",{className:"entry",headers:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3 ",rowSpan:5,children:(0,c.jsx)("a",{className:"xref j-external-link",href:"https://api-docs.katalon.com/com/kms/katalon/core/testobject/TestObject.html",target:"_blank",children:"Test Object"})}),(0,c.jsxs)("td",{className:"entry",headers:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3 ",children:[(0,c.jsx)("a",{className:"xref j-external-link",href:"https://api-docs.katalon.com/com/kms/katalon/core/testobject/TestObject.html#addProperty(java.lang.String,%20com.kms.katalon.core.testobject.ConditionType,%20java.lang.String)",target:"_blank",children:"addProperty"}),"(",(0,c.jsx)("a",{className:"xref j-external-link",href:"http://docs.oracle.com/javase/8/docs/api/java/lang/String.html",target:"_blank",children:"String"})," name, ",(0,c.jsx)("a",{className:"xref j-external-link",href:"https://api-docs.katalon.com/com/kms/katalon/core/testobject/ConditionType.html",target:"_blank",children:"ConditionType"})," condition, ",(0,c.jsx)("a",{className:"xref j-external-link",href:"http://docs.oracle.com/javase/8/docs/api/java/lang/String.html",target:"_blank",children:"String"})," value)"]}),(0,c.jsx)("td",{className:"entry",headers:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3 ",children:"Add a new property to the test object"})]}),(0,c.jsxs)("tr",{className:!0,children:[(0,c.jsxs)("td",{className:"entry",headers:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3 ",children:[(0,c.jsx)("a",{className:"xref j-external-link",href:"https://api-docs.katalon.com/com/kms/katalon/core/testobject/TestObject.html#setProperties(List)",target:"_blank",children:"setProperties"}),"(",(0,c.jsx)("a",{className:"xref j-external-link",href:"http://docs.oracle.com/javase/8/docs/api/java/util/List.html",target:"_blank",children:"List"}),"<",(0,c.jsx)("a",{className:"xref j-external-link",href:"https://api-docs.katalon.com/com/kms/katalon/core/testobject/TestObjectProperty.html",target:"_blank",children:"TestObjectProperty"}),"> properties)"]}
1),(0,c.jsx)("td",{className:"entry",headers:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3 ",children:"Set the properties of the test object"})]}),(0,c.jsxs)("tr",{className:!0,children:[(0,c.jsx)("td",{className:"entry",headers:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3 ",children:(0,c.jsx)("a",{className:"xref j-external-link",href:"https://api-docs.katalon.com/com/kms/katalon/core/testobject/TestObject.html#getObjectId()",target:"_blank",children:"getObjectId()"})}),(0,c.jsx)("td",{className:"entry",headers:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3 ",children:"Get an object ID"})]}),(0,c.jsxs)("tr",{className:!0,children:[(0,c.jsxs)("td",{className:"entry",headers:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3 ",children:[(0,c.jsx)("a",{className:"xref j-external-link",href:"https://api-docs.katalon.com/com/kms/katalon/core/testobject/TestObject.html#findPropertyValue(java.lang.String,%20boolean)",target:"_blank",children:"findPropertyValue"}),"(",(0,c.jsx)("a",{className:"xref j-external-link",href:"http://docs.oracle.com/javase/8/docs/api/java/lang/String.html",target:"_blank",children:"String"})," name, boolean caseSensitive)"]}),(0,c.jsx)("td",{className:"entry",headers:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3 ",children:"Find the value of a property using the property name"})]}),(0,c.jsxs)("tr",{className:!0,children:[(0,c.jsxs)("td",{className:"entry",headers:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3 ",children:[(0,c.jsx)("a",{className:"xref j-external-link",href:"https://api-docs.katalon.com/com/kms/katalon/core/testobject/TestObject.html#setSelectorMethod(com.kms.katalon.core.testobject.SelectorMethod)",target:"_blank",children:"setSelectorMethod"}),"(",(0,c.jsx)("a",{className:"xref j-external-link",href:"https://api-docs.katalon.com/com/kms/katalon/core/testobject/SelectorMethod.html",target:"_blank",children:"SelectorMethod"})," selectorMethod)"]}),(0,c.jsx)("td",{className:"entry",headers:"task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__1 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__2 task-5750__c2da5d31-dc01-4bf6-95a1-cec2199b10e3__entry__3 ",children:"Set the selection method for the test object"})]})]})]}),(0,c.jsxs)("p",{className:"p",children:["This example demonstrates how to define the Medicare option in the AUT using ",(0,c.jsx)("code",{className:"ph codeph",children:"TestObject"}),", ",(0,c.jsx)("code",{className:"ph codeph",children:"setSelectorMethod"}),", and ",(0,c.jsx)("code",{className:"ph codeph",children:"addProperty()"})," classes."]}),(0,c.jsx)("p",{className:"p",children:(0,c.jsx)("img",{className:"image",width:500,src:(0,l.Ay)("/562419c0-d5fe-11ee-9719-0242c7a41fd4/KS_AUT_healthcare_medicare_selected.png")})})]}),"\n",(0,c.jsxs)(t.ol,{children:["\n",(0,c.jsxs)(t.li,{children:["Open a test case and switch to the\xa0",(0,c.jsx)(t.strong,{children:"Script View"}),"."]}),"\n",(0,c.jsxs)(t.li,{children:["Depending on the selection method you want to use, copy and paste the script below accordingly:","\n",(0,c.jsxs)(t.ol,{children:["\n",(0,c.jsxs)(t.li,{children:["\n",(0,c.jsxs)(t.p,{children:[(0,c.jsx)(t.strong,{children:"Attributes"}),":"]}),"\n",(0,c.jsx)(t.pre,{children:(0,c.jsx)(t.code,{className:"language-jsx",children:"import com.kms.katalon.core.testobject.SelectorMethod\n\n// Create a new object programmatically\nTestObject medicareOption = new TestObject('Medicare')\n\n//Attributes\n//Add property to Test Object, a property is defined by:\n// property name,\n// condition type,\n// property value,\n// a boolean value to indicate if the property will be used to identify the object during execution\nmedicareOption.setSelectorMethod(SelectorMethod.BASIC)\nmedicareOption.addProperty('xpath', \"//*[@id=\\\"a
1ppointment\\\"]/div/div/form/div[3]/div/label[1]\", true) //Medicare\n"})}),"\n"]}),"\n",(0,c.jsxs)(t.li,{children:["\n",(0,c.jsxs)(t.p,{children:[(0,c.jsx)(t.strong,{children:"XPath"}),":"]}),"\n",(0,c.jsx)(t.pre,{children:(0,c.jsx)(t.code,{className:"language-jsx",children:'import com.kms.katalon.core.testobject.SelectorMethod\n\n// Create a new object programmatically\nTestObject medicareOption = new TestObject(\'Medicare\')\n\n//XPATH selection method\nmyNewObject.setSelectorValue(SelectorMethod.XPATH,"//*[@id=\\"appointment\\"]/div/div/form/div[3]/div/label[1]") //Medicare\nmyNewObject.setSelectorMethod(SelectorMethod.XPATH)\n'})}),"\n"]}),"\n",(0,c.jsxs)(t.li,{children:["\n",(0,c.jsxs)(t.p,{children:[(0,c.jsx)(t.strong,{children:"CSS"}),":"]}),"\n",(0,c.jsx)(t.pre,{children:(0,c.jsx)(t.code,{className:"language-jsx",children:"import com.kms.katalon.core.testobject.SelectorMethod\n\n// Create a new object programmatically\nTestObject medicareOption = new TestObject('Medicare')\n\n//CSS selection method\nmyNewObject.setSelectorValue(SelectorMethod.CSS,\"#appointment > div > div > form > div:nth-child(3) > div > label:nth-child(1)\") //Medicare\nmyNewObject.setSelectorMethod(SelectorMethod.CSS)\n"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(t.h2,{id:"verify-web-test-object",children:[(0,c.jsx)("a",{id:"task-2417",class:"anchor_top_offset"}),"Verify Web test object"]}),"\n",(0,c.jsxs)("section",{xmlns:"http://www.w3.org/1999/xhtml",className:"section context",children:["The Web Object Spy utility allows you to verify if an manually created test object has valid locators. To add test objects to the ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Web Object Spy"})," dialog to verify the detection in the AUT, do as follows: "]}),"\n",(0,c.jsxs)("ol",{xmlns:"http://www.w3.org/1999/xhtml",className:"ol steps",children:[(0,c.jsxs)("li",{className:"li step stepexpand",children:[(0,c.jsxs)("span",{className:"ph cmd",children:["Right-click on the object item and select ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Add to Web Object Spy"}),"."]}),(0,c.jsx)("div",{className:"itemgroup info",children:(0,c.jsx)("img",{className:"image",width:350,src:(0,l.Ay)("/e6497d10-1673-11ee-bd0e-0242c7a41fd4/ks-865-add-to-object-spy.png"),alt:"Right-click on object > Add to Web Object Spy"})}),(0,c.jsxs)("div",{className:"itemgroup stepresult",children:["The ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Object Spy"})," dialog opens with the selected object.",(0,c.jsx)("p",{className:"p",children:(0,c.jsx)("img",{className:"image",width:400,src:(0,l.Ay)("/560df9b0-d5fe-11ee-9719-0242c7a41fd4/KS_object_spy.png"),alt:"Object Spy dialog"})})]})]}),(0,c.jsxs)("li",{className:"li step stepexpand",children:[(0,c.jsxs)("span",{className:"ph cmd",children:["In the dialog, click ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Start"})," to open the browser."]}),(0,c.jsxs)("div",{className:"itemgroup info",children:["Click ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Verify and Highlight"})," to double-check if the web object can be located.",(0,c.jsx)("img",{className:"image",width:650,src:"https://tw-cdn.katalon.com/katalon-studio/KS_object_spy_verify_element.png",alt:"Element verified with red border"}),(0,c.jsxs)("p",{className:"p",children:[(0,c.jsx)("span",{className:"ph",children:"Katalon Studio"})," will display the message on how many elements are found or not. If the object is found, it will be highlighted with the red border."]})]})]}),(0,c.jsx)("li",{className:"li step stepexpand",children:(0,c.jsxs)("span",{className:"ph cmd",children:["Once finished, click ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Save"})," to add the object to ",(0,c.jsx)("span",{className:"ph uicontrol",children:"Object Repository"})," as normal."]})})]})]})}function p(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,c.jsx)(t,{...e,children:(0,c.jsx)(h,{...e})}):h(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>l,x:()=>o});var a=s(96540);const c={},n=a.createContext(c);function l(e){const t=a.useContext(n);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:l(e.components),a.createElement(n.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.