Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 空手道UI自动化-如何在不提供xpath的情况下为下拉列表和文本字段编写断言脚本 def prodType=text(“{mat option/span}”)_Javascript - Fatal编程技术网

Javascript 空手道UI自动化-如何在不提供xpath的情况下为下拉列表和文本字段编写断言脚本 def prodType=text(“{mat option/span}”)

Javascript 空手道UI自动化-如何在不提供xpath的情况下为下拉列表和文本字段编写断言脚本 def prodType=text(“{mat option/span}”),javascript,Javascript,然后打印“产品类型值------->”,prodType 匹配prodType=='' error:{“type”:“object”,“subtype”:“error”,“className”:“TypeError”,“description”:“TypeError:无法读取null的属性'textContent'\n位于:1:121”,“objectId”:“{\“injectedScriptId\”:1,\“id\”:9}” error: {"type":"

然后打印“产品类型值------->”,prodType

  • 匹配prodType==''
error:{“type”:“object”,“subtype”:“error”,“className”:“TypeError”,“description”:“TypeError:无法读取null的属性'textContent'\n位于:1:121”,“objectId”:“{\“injectedScriptId\”:1,\“id\”:9}”
error: {"type":"object","subtype":"error","className":"TypeError","description":"TypeError: Cannot read property 'textContent' of null\n    at <anonymous>:1:121","objectId":"{\"injectedScriptId\":1,\"id\":9}"}