[英]Robot Framework - Can't set Object for Attribute using Execute JavaScript
I want to set Object for value attribute using Execute Javascript but it doesn't work with robot framework (it work with C#) Keyword: 我想使用Execute Javascript将Object设置为value属性,但是它不适用于机器人框架(与C#一起使用)关键字:
InputTeasersForPageType
[Arguments] ${id}
${result}= Set Json Value {"PageId":"${id}"} /PageId "${id}"
${json_string}= Stringify Json [${result}]
Unselect Frame
Select Frame id=ctl00_ctl00_FullRegion_EditPanelDiv
Log ${json_string}
Execute Javascript window.document.getElementById('ctl00_FullRegion_PC_109_1_EditForm_ctl18_hidValues').getAttribute('value');
Execute Javascript window.document.getElementById('ctl00_FullRegion_PC_109_1_EditForm_ctl18_hidValues').setAttribute('value',${json_string});
您是否尝试过这个,但我认为它应该可以执行Java window.document.getElementById('ctl00_FullRegion_PC_109_1_EditForm_ctl18_hidValues').value='${json_string}'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.