12/25 - Christmas Monday!

Status
Not open for further replies.

Timuks

Bonjorno
Joined
Aug 18, 2016
Messages
524
Reaction score
2,143
Points
493
Location
Lithuania
Gender
Male
I'm doing barcodes and it doesn't matter where I click on the page. I am also trying to inspect the frame source and I can't right click anywhere to get the view frame source option. So maybe it's something about this hit.
In that case I can't help you - I can't do barcodes :(
 

Kliq

Well-Known Member
Joined
Mar 14, 2016
Messages
2,064
Reaction score
6,914
Points
763
Gender
Male
Last edited:

DCI

Well-Known Member
Joined
Jan 14, 2016
Messages
1,997
Reaction score
6,223
Points
763
Age
46
Location
212
Gender
Male
I'm doing barcodes and it doesn't matter where I click on the page. I am also trying to inspect the frame source and I can't right click anywhere to get the view frame source option. So maybe it's something about this hit.
Barcodes don't have an iframe. If you use the selector document.getElementById("submitButton") it won't click those buttons on the worker site. It also won't submit the HIT. You need a different selector for that one.
 
Last edited:

Type2Work

Active Member
Contributor
Joined
Jan 19, 2016
Messages
787
Reaction score
1,104
Points
468
Gender
Female
Barcodes don't have an iframe. If you use the selector document.getElementById("submitButton") it won't click those buttons on the worker site. It also won't submit the HIT. You need a different selector for that one.
Thanks
I just tried it on another hit and it did the same thing. It's slow enough that maybe I can figure it out today.
 
  • Like
Reactions: SherryNotShirley

DCI

Well-Known Member
Joined
Jan 14, 2016
Messages
1,997
Reaction score
6,223
Points
763
Age
46
Location
212
Gender
Male
Thanks
I just tried it on another hit and it did the same thing. It's slow enough that maybe I can figure it out today.
Well, it is like Timuks said, if the parent page of a HIT is in focus instead of the frame, it can cause that problem, because it's type is also submit. If you change
Code:
document.querySelector(`[type="submit"]`).click();
to

Code:
document.getElementById("submitButton").click();
It will still submit most HITs, but you won't have that problem anymore. You could also exclude the worker site from your script so that it won't even activate on the parent pages.

If you want to make a script that clicks the submit button for no-iframe hits on the woker site, you will need to use

Code:
document.getElementsByClassName("btn btn-primary")[0]
 
Last edited:

Type2Work

Active Member
Contributor
Joined
Jan 19, 2016
Messages
787
Reaction score
1,104
Points
468
Gender
Female
Well, it is like Timuks said, if the parent page of a HIT is in focus instead of the frame, it can cause that problem, because it's type is also submit. If you change
Code:
document.querySelector(`[type="submit"]`).click();
to

Code:
document.getElementById("submitButton").click();
It will still submit most HITs, but you won't have that problem anymore.

If you want to make a script that clicks the submit button for no-iframe hits on the woker site, you will need to use

Code:
document.getElementsByClassName("btn btn-primary")[0]
or

Code:
document.getElementsByClassName("btn btn-primary")[1]
awesome thank you. I just figured out how to make a script that has a value selected. Will try this next.
 
  • Like
Reactions: DCI

lsutiger25

Well-Known Member
Contributor
Joined
Sep 16, 2016
Messages
4,999
Reaction score
8,116
Points
888
Gender
Female
I think its been asked before....but its there a script for Doe?
 

GRR

Well-Known Member
Joined
Oct 29, 2017
Messages
1,601
Reaction score
2,341
Points
513
Age
68
Gender
Male
barcodes group id 3IXQCB6XI8K83NCT57XLLJQ9PLUITJ
 
Status
Not open for further replies.