How to excute javascript on Robotframework

http://blog.csdn.net/liberalwu/article/details/6822456

GUI_Check_Wifi_Mode
[Arguments]    ${expect}
GUI_LoginDUT
Click Element    id=top_wireless
Click Element    id=left_wl_basic
${value}    Execute Javascript    return window.document.getElementById('wireless_dot11_mode').options[window.document.getElementById('wireless_dot11_mode').selectedIndex].innerHTML
${rc}    ${output}    Run And Return Rc And Output    echo "${value}" | awk -F "(" '{print $2}' | awk -F ")" '{print $1}' | tr '[A-Z]' '[a-z]'
Log    ${output}
Should Be Equal As Strings    ${output}    ${expect}

${row}    Execute Javascript    return document.getElementById('ipv6routingDetails').rows.length
${colum}    Execute Javascript    return document.getElementById('ipv6routingDetails').rows[0].cells.length


你可能感兴趣的:(JavaScript,robotframework)