PageSourceSearch

https://docs-production-katalon.netlify.app/assets/js/e7d43fa9.900844d6.js

js docs-production-katalon.netlify.app collected 2026-10-03 10:41:59 UTC 5,954 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkKatalon_Docs=self.webpackChunkKatalon_Docs||[]).push([[8657],{28453:(e,t,i)=>{i.d(t,{R:()=>a,x:()=>d});var s=i(96540);const n={},r=s.createContext(n);function a(e){const t=s.useContext(r);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(n):e.components||n:a(e.components),s.createElement(r.Provider,{value:t},e.children)}},65885:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>d,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-assert-element-attribute-value","title":"[WebUI] Assert Element Attribute Value","description":"Assert that the element attribute value equals the expected value within a specified timeout.","source":"@site/docs/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-assert-element-attribute-value.md","sourceDirName":"keywords/keyword-description-in-katalon-studio/web-ui-keywords","slug":"/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-assert-element-attribute-value","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-assert-element-attribute-value","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedAt":1787733402000,"frontMatter":{"title":"[WebUI] Assert Element Attribute Value","description":"Assert that the element attribute value equals the expected value within a specified timeout."},"sidebar":"katalon-studio","previous":{"title":"[WebUI] Accept Alert","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-accept-alert"},"next":{"title":"[WebUI] Assert Element Checked","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-assert-element-checked"}}');var n=i(74848),r=i(28453);const a={title:"[WebUI] Assert Element Attribute Value",description:"Assert that the element attribute value equals the expected value within a specified timeout."},d=void 0,l={},o=[{value:"Description",id:"description",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Examples",id:"examples",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.admonition,{title:"Prerequisites",type:"caution",children:(0,n.jsxs)(t.p,{children:["This keyword is available from Katalon Studio version ",(0,n.jsx)(t.strong,{children:"11.2.0+"}),"."]})}),"\n",(0,n.jsx)(t.h2,{id:"description",children:"Description"}),"\n",(0,n.jsxs)(t.p,{children:["Assert that the value of the named attribute exactly matches ",(0,n.jsx)(t.code,{children:"attributeValue"})," within a specified timeout."]}),"\n",(0,n.jsxs)(t.p,{children:["Keyword name: ",(0,n.jsx)(t.code,{children:"assertElementAttributeValue"})]}),"\n",(0,n.jsxs)(t.p,{children:["Katalon Studio polls the condition until it is satisfied or the timeout expires. If the condition is not satisfied, the keyword applies the configured failure handling: ",(0,n.jsx)(t.code,{children:"STOP_ON_FAILURE"})," stops execution, ",(0,n.jsx)(t.code,{children:"CONTINUE_ON_FAILURE"})," records a failed step and continues, and ",(0,n.jsx)(t.code,{children:"OPTIONAL"})," logs a warning and continues."]}),"\n",(0,n.jsx)(t.h2,{id:"parameters",children:"Parameters"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Parameter Type"}),(0,n.jsx)(t.th,{children:"Required"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"to"})}),(0,n.jsx)(t.td,{children:"TestObject"}),(0,n.jsx)(t.td,{children:"Yes"}),(0,n.jsx)(t.td,{children:"Represents the web element to evaluate."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"attributeName"})}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"Yes"}),(0,n.jsx)(t.td,{children:"Specifies the name of the attribute to evaluate."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"attributeValue"})}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"Yes"}),(0,n.jsx)(t.td,{children:"Specifies the expected attribute value. The comparison is exact."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"timeOut"})}),(0,n.jsx)(t.td,{children:"int"}),(0,n.jsx)(t.td,{children:"Yes"}),(0,n.jsx)(t.td,{children:"Specifies the maximum time, in seconds, to wait for the condition. A negative value uses the configured WebUI element timeout."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"flowControl"})}),(0,n.jsx)(t.td,{children:"FailureHandling"}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsxs)(t.td,{children:["Specifies the ",(0,n.jsx)(t.a,{href:"/katalon-studio/maintain-tests/configure-failure-handling-settings-in-katalon-studio",children:"failure handling"})," behavior for execution failures. When omitted, this parameter uses the project default failure handling."]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"examples",children:"Examples"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-jsx",children:"WebUI.assertElementAttributeValue(findTestObject('Page_Main/element'), 'class', 'active', 10)\n\nWebUI.assertElementAttributeValue(findTestObject('Page_Main/element'), 'class', 'active', 10, FailureHandling.CONTINUE_ON_FAILURE)\n"})})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(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.