getProperty
Get Element Property コマンドは、要素のプロパティを取得した結果を返します。
使用方法
$(selector).getProperty(property)
パラメータ
名前 | タイプ | 詳細 |
---|---|---|
property | 文字列 | 要素プロパティの名前 |
例
getProperty.js
it('should demonstrate the getProperty command', async () => {
var elem = await $('body')
var tag = await elem.getProperty('tagName')
console.log(tag) // outputs: "BODY"
})