简体   繁体   English

自动化表单:表单错误,未捕获的类型错误:无法读取 null 的属性“值”

[英]Automating a form: Form error, Uncaught TypeError: Cannot read property ‘value’ of null

I am trying to automate a form but i get an error.我正在尝试使表单自动化,但出现错误。

Uncaught TypeError: Cannot read property 'value' of null

This is the JS code.这是JS代码。

var elemFound = SingleNodeForXPath( searchTitle );
var result = elemFound.value; #### Uncaught TypeError: Cannot read property 'value' of null ###
return "GOOD:" + result;
})();

This is the end of the js code and error.这是js代码和错误的结尾。

This is the HTML code.这是HTML代码。

<input class="form-control decimal " id="time_card.monday" name="time_card.monday" 
maxlength="14" value="" onchange="this.value=formatNumber(this.value);onChange('time_card.monday');" style="; " aria-label="Monday">

Thanks for all the help in advance.感谢您提前提供的所有帮助。

I am using keyboard maestro to automate it:)我正在使用keyboard maestro来自动化它:)

This error means that the SingleNodeForXPath( searchTitle );这个错误意味着SingleNodeForXPath( searchTitle ); function was unable to find the element you are looking for. function 无法找到您要查找的元素。

You can try document.getElementById('time_card.monday') instead.您可以尝试document.getElementById('time_card.monday')代替。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未捕获的TypeError:无法以离子反应形式读取null的属性“值” - Uncaught TypeError: Cannot read property 'value' of null in ionic reactive form 未捕获的TypeError:无法读取null HTML表单的属性“值”是正确的 - Uncaught TypeError: Cannot read property 'value' of null HTML Form is correct 无法通过下拉表单将值传递给 JavaScript 变量 - 错误:“未捕获的类型错误:无法读取 null 的属性‘值’” - Unable to pass value to JavaScript variable form a drop down form - Error: "Uncaught TypeError: Cannot read property 'value' of null" 未捕获的TypeError:无法读取null的属性&#39;paypal_form&#39; - Uncaught TypeError: Cannot read property 'paypal_form' of null 验证表单 function 出现问题(未捕获的类型错误:无法读取 null 的属性“值”) - Problem with validating form function (Uncaught TypeError: Cannot read property 'value' of null) 未捕获的TypeError:无法读取null的属性“值”-Chrome中的错误 - Uncaught TypeError: Cannot read property 'value' of null - error in Chrome 如何解决“ Uncaught TypeError:无法读取null的属性&#39;value&#39;”错误? - How to Fix “Uncaught TypeError: Cannot read property 'value' of null” error? 未被捕获的TypeError:无法读取未定义的属性“ form” - Uncaught TypeError: Cannot read property 'form' of undefined 未捕获的TypeError:无法读取null的属性“值” - Uncaught TypeError: Cannot read property 'value' of null 未捕获的类型错误:无法读取 null 的属性“值” - Uncaught TypeError: Cannot read property 'value' of null
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM