1"use strict";(self.webpackChunkKatalon_Docs=self.webpackChunkKatalon_Docs||[]).push([[5992],{28453:(e,t,a)=>{a.d(t,{R:()=>i,x:()=>d});var s=a(96540);const o={},n=s.createContext(o);function i(e){const t=s.useContext(n);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(n.Provider,{value:t},e.children)}},86299:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>r,contentTitle:()=>d,default:()=>l,frontMatter:()=>i,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-click-image","title":"[WebUI] Click Image","description":"Known limitation: The clickImage keyword may not function as expected in Safari due to browser-specific limitations in handling image objects. We recommend using other browsers like Chrome or Firefox for this image-based operation.","source":"@site/docs/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-click-image.md","sourceDirName":"keywords/keyword-description-in-katalon-studio/web-ui-keywords","slug":"/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-click-image","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-click-image","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedAt":1758935351000,"frontMatter":{"title":"[WebUI] Click Image"},"sidebar":"katalon-studio","previous":{"title":"[WebUI] Click","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-click"},"next":{"title":"[WebUI] Click Offset","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-click-offset"}}');var o=a(74848),n=a(28453);const i={title:"[WebUI] Click Image"},d=void 0,r={},c=[{value:'<a class="anchor_top_offset"></a>Description',id:"description",level:2},{value:'<a class="anchor_top_offset"></a>Parameters',id:"parameters",level:2},{value:'<a class="anchor_top_offset"></a>Example',id:"example",level:2}];function _(e){const t={code:"code",h2:"h2",pre:"pre",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"note note note_note",children:[(0,o.jsx)("span",{className:"note__title",children:"Known limitation:"})," ",(0,o.jsxs)("p",{className:"p",children:["The ",(0,o.jsx)("code",{className:"ph codeph",children:"clickImage"})," keyword may not function as expected in Safari due to browser-specific limitations in handling image objects. We recommend using other browsers like Chrome or Firefox for this image-based operation."]})]}),"\n",(0,o.jsxs)(t.h2,{id:"description",children:[(0,o.jsx)("a",{id:"id_0__id_1",class:"anchor_top_offset"}),"Description"]}),"\n",(0,o.jsx)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:"Click on an image on the web page."}),"\n",(0,o.jsxs)("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["Keyword name: ",(0,o.jsx)("code",{className:"ph codeph",children:"clickImage"}),(0,o.jsxs)("div",{className:"note note note_note",children:[(0,o.jsx)("span",{className:"note__title",children:"Note:"})," ",(0,o.jsx)("ul",{className:"ul",children:(0,o.jsx)("li",{className:"li",children:(0,o.jsxs)("p",{className:"p",children:["The ",(0,o.jsx)("code",{className:"ph codeph",children:"clickImage"})," keyword is not supported in headless browser mode."]})})})]})]}),"\n",(0,o.jsxs)(t.h2,{id:"parameters",children:[(0,o.jsx)("a",{id:"id_0__id_2",class:"anchor_top_offset"}),"Parameters"]}),"\n",(0,o.jsxs)("table",{xmlns:"http://www.w3.org/1999/xhtml",className:"table anchor_top_offset",id:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099",children:[(0,o.jsx)("caption",{}),(0,o.jsx)("thead",{className:"thead",children:(0,o.jsxs)("tr",{className:!0,children:[(0,o.jsx)("th",{className:"entry anchor_top_offset",id:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__1",children:"Parameter"}),(0,o.jsx)("th",{className:"entry anchor_top_offset",id:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__2",children:"Parameter Type"}),(0,o.jsx)("th",{className:"entry anchor_top_offset",id:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__3",children:"Required"}),(0,o.jsx)("th",{className:"entry anchor_top_offset",id:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__4",children:"Description"})]})}),(0,o.jsxs)("tbody",{className:"tbody",children:[(0,o.jsxs)("tr",{className:!0,children:[(0,o.jsx)("td",{className:"entry",headers:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__1 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__2 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__3 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__4 ",children:"to"}),(0,o.jsx)("td",{className:"entry",headers:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__1 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__2 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__3 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__4 ",children:"TestObject"}),(0,o.jsx)("td",{className:"entry",headers:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__1 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__2 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__3 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__4 ",children:"Yes"}),(0,o.jsx)("td",{className:"entry",headers:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__1 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__2 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__3 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__4 ",children:"Represents an image."})]}),(0,o.jsxs)("tr",{className:!0,children:[(0,o.jsx)("td",{className:"entry",headers:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__1 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__2 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__3 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__4 ",children:"flowControl"}),(0,o.jsx)("td",{className:"entry",headers:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__1 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__2 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__3 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__4 ",children:"FailureHandling"}),(0,o.jsx)("td",{className:"entry",headers:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__1 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__2 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__3 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__4 ",children:"Optional"}),(0,o.jsxs)("td",{className:"entry",headers:"id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__1 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__2 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__3 id_0__dc710f06-0d76-4969-bb70-7157e15ad099__entry__4 ",children:["Specify ",(0,o.jsx)("a",{className:"xref",href:"/katalon-studio/maintain-tests/configure-failure-handling-settings-in-katalon-studio",children:"failure handling"})," schema to determine whether the execution should be allowed to continue or stop."]})]})]})]}),"\n",(0,o.jsxs)(t.h2,{id:"example",children:[(0,o.jsx)("a",{id:"id_0__id_3",class:"anchor_top_offset"}),"Example"]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["You want to click on the ",(0,o.jsx)("code",{className:"ph codeph",children:"img_Logo"})," image:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-jsx",children:"import static com.kms.katalon.core.checkpoint.CheckpointFactory.findC
1heckpoint\nimport static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase\nimport static com.kms.katalon.core.testdata.TestDataFactory.findTestData\nimport static com.kms.katalon.core.testobject.ObjectRepository.findTestObject\nimport com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint\nimport com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory\nimport com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords\nimport com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile\nimport com.kms.katalon.core.model.FailureHandling as FailureHandling\nimport com.kms.katalon.core.testcase.TestCase as TestCase\nimport com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory\nimport com.kms.katalon.core.testdata.TestData as TestData\nimport com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory\nimport com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository\nimport com.kms.katalon.core.testobject.TestObject as TestObject\nimport com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords\nimport com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS\nimport com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords\nimport com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI\nimport internal.GlobalVariable as GlobalVariable\n\n'Open browser and navigate to a site that contains the image to click on'\nWebUI.openBrowser(GlobalVariable.G_SiteURL)\n\n'Click on the image'\nWebUI.clickImage(findTestObject('img_Logo'))\n\n'Close browser'\nWebUI.closeBrowser()\n"})})]})}function l(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(_,{...e})}):_(e)}}}]);
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.