முக்கிய உள்ளடக்கத்திற்குச் செல்லவும்

getProperty பெறு

The Get Element Property command will return the result of getting a property of an element.

Usage​
$(selector).getProperty(property)
Parameters​
NameTypeDetails
propertystringname of the element property
Example​
getProperty.js
it('should demonstrate the getProperty command', async () => {
var elem = await $('body')
var tag = await elem.getProperty('tagName')
console.log(tag) // outputs: "BODY"
})
Returns​
  • <unknown> return: the value of the property of the selected element

Welcome! How can I help?

WebdriverIO AI Copilot