Groups
Groups
Sign in
Groups
Groups
Autofill Extension
Conversations
Labels
About
Send feedback
Help
Cannot read property 'click' of null
5,433 views
Skip to first unread message
kobe...@gmail.com
unread,
Aug 5, 2018, 1:26:01 AM
8/5/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Autofill Chrome Extension
website:
https://www.hpb.gov.tw/p/412-1000-116.php?Lang=zh-tw
I want auto click left button by Autofill.
Type
= JavaScript
Value
=
document.querySelector('input[type="submit"]').click();
But it doesn't work,
debug console show below message:
[Autofill] The following JavaScript code was not executed:
document.querySelector('input[type="submit"]').click()
Error: Cannot read property 'click' of null
Frame:
https://www.hpb.gov.tw/p/412-1000-116.php?Lang=zh-tw
thdoan
unread,
Aug 5, 2018, 11:39:08 PM
8/5/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Autofill Chrome Extension
That's because when it goes to the next page there are two inputs there that match
input[type="submit"]
. Try changing your JS code to this:
document.querySelector('input[name="ctl00$ContentPlaceHolder1$btnOK"]').click();
samthebe...@gmail.com
unread,
Jul 13, 2019, 11:54:51 PM
7/13/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Autofill Chrome Extension
i also kind of had the same problem, my code was:
$(document).ready(function clickbutton(){
'use strict';
setInterval(function($){ document.getElementById('nextactivity').click(); },15000);
})(jQuery);
and it said: caught TypeError: Cannot read property 'click' of null.
hope you can help!
thanks
Reply all
Reply to author
Forward
0 new messages