I work with browser automation tool,
I have a problem I get the solution of the captcha but I can not execute the button, the button is invisible, someone may know how to execute it
I tried to use a few things to make it execute:
document.getElementsByClassName("button-submit button").submit();
document.getElementsByClassName("button-submit button").onclick();
and a few more
In addition I tried to use a plugin called anycaptcha (https://anycaptcha.com/)
document.getElementById('anycaptchaSolveButton').onclick('Token');
I inserted the captcha solution to where I was supposed to insert (* token) and it still did not work for me, I do not know if I did the commands correctly or did execute the wrong thing, I would be happy to help
I tried to do it with form as well and send and still did not work for me.
Form:
Button-submit button:
I'm trying to do it to discord does anyone know how to execute it?
Related
I used plugin for https://bitbucket.org/jupitercow/acf-vimeo-uploader-field/src/master/ and unfortunelly it stopped working. Now "Select file" button doesn't make any action. API looks good. Console doesn't display any errors. Variables from JS return correct results. Do you have any ideas?
I would be grateful for any help.
See the last two issues:
It's a plugin bug, so you won't do much about it, unless you're programmer yourself. I'd suggest waiting for the author to fix it, or find a way to reach your goal without the need of having Vimeo upload field.
I made a website that has about 400 lines of javascript code, on the front end. I want to put it on the back end so that when people visit the web page that uses the javascript, and click the submit button, only then does the website go to the server and use the necessary JS code, however with all the tutorials ive read and watched i cannot find anything specific to this, can anyone please help? thanks in advance
I have been trying to do some manipulation on webpages using JavaScript. So I started with the basic Google page(https://google.com).
I ran the command
document.getElementById('lst-ib').value = 'search_term';
Then after that tried running
document.getElementsByName('btnI')[0].click();
which is the I'm feeling Lucky button.
It is showing undefined on doing so.
But when I try only click on the I'm Feeling Lucky button without changing the content of the search bar, it works.
The target is to click the Search Button, it is also not working.
So I used the I'm Feeling Lucky button for testing to see if anything can be clicked.
The Same is happening in YouTube search bar as well
Any help or guidance would be much appreciated.
Also please note that I am N00b and trying to learn as I go :(
TLDR; The Idea is to simulate all the operation a user can do on the browsers using JavaScript.
document.getElementById('lst-ib').value = 'search_term';
document.getElementById('tsf').submit();
(or document.querySelector("form").submit();)
I'm not entirely sure what you're trying to achieve, but did you consider just using the queryparams? google.com?search=search_term ?
I found this ID simply by going to google.com, rightclicking on the input field, choose 'inspect element' and search for the first ancestor that is a 'form'.
I'm quite bad with Javascript and I can't work out a solution I need help to. I'm having a website and I'm trying to make a redirection to another site, but through a popup.
Example :
<script>alert(This will prompt up the message)</scrip>
<script>window.location="http://This-will-redirect-me-to-another-link.com";</scrip>
Like you can see I could simply use the second javascript to redirect the persons to another page, but due some reasons I can't use it as it will work only for half of the page(the script would be kinda 'sandboxed'), but if I'd make a popup(the first alert script) the second script would get out of the 'sandbox'. Is there anyone who has any ideas how I should implement this or can it be done otherwise with PHP or HTML?
I'm having a MyBB forum and there's a shoutbox for it which I'm using. There's a command which will change the notice of the shoutbox and the command is as such /notice New notice | But I noted that the new notice can be changed with javascript and it'll work such as /notice js code here | Then I thought that what if I would make such a javascript that would redirect people to another webpage. As I'm having such a forum where it's needed to redirect from the main page to another one, I'd like to apply it. Then Staffs could do it in the forum very well, but there's a problem. by adding
/notice window.location="http://This-will-redirect-me-to-another-link.com";
It'll affect only the shoutbox and shoutbox is being redirected to another webpage, but as an alert works for the whole forum I thought maybe I can redirect them to somewhere else with the alert. I want to know is it possible with just one script then Staffs would be able to do it. I know it's a serious security risk & it can be otherwise also, but I'd really like to experiment with it.
I hope someone can help. :)
Try:
window.open('url to other site', 'window name', 'width=900,height=650,scrollbars=yes');
If I understand you (if not please correct me), you can put a tag on popup or another place:
<a href="http://another.site.com/"
onclick="return confirm('Do you want to see another page?');">Redirect</a>
I have to say I am new to Perl, maybe made about 3 or 4 scripts so far, and I find Perl decently easy to understand and use.
Anyways, I have a problem with my current script. I have been stuck on this problem for a while and just can't seem to find a fix for it.
After traversing a certain website I come to a page that has me click between two radio buttons and hit a download button.
I need to get my script to select either button and hit download, but the source of the page does not give me a value to set the radio button to when using WWW::Mechanize.
Here is a little bit of the web page source.
<input type='radio' onclick="url('URL GOES HERE')">
That is pretty much it for the two buttons. I noticed that when I did choose one and looked at the source, the code changes to
<input type='radio' checked onclick="url('URL GOES HERE')">
Yet I can't have WWW::Mechanize set one automatically because I have no idea what to put in the value. I have tried on, checked, onclick, true, checked onclick, select, selected, but to no avail.
Here is the line of code that pertains to this
$mech->set_visible([radio => 'checked onclick']);
Any help would be appreciated, first time here as well.
I forgot to mention that I am working with a computer at work that has a lot of restrictions for now. So I can't get Firefox or Selenium Server on the computer.
Edit
I believe the problem that I might be having also is that this stuff might be in JavaScript. I don't have much knowledge in HTML but the source code looked like it was until I saw JavaScript somewhere in the heading? Anyways, I remembered that WWW::Mechanize doesn't really support JavaScript and so maybe this is the problem.
Thanks for the replies guys, I really appreciated it. But after a ton of digging around and careful inspection, my boss and I sort of realized that all the download links are very similar, and all I really need to do is make the script custom create the links to the downloads instead of going through the hassle of taversing multiple web pages. Wish I saw this sooner.
HTML::Form does not offer an API to activate unnamed radio buttons. You can read the distinguishing attribute by digging into the innards. This should work (mostly untested):
use WWW::Mechanize qw();
my $w = WWW::Mechanize->new;
$w->get('file:///tmp/so11767998.html');
for my $input (($w->forms)[0]->inputs) {
$input->check if q{url('URL GOES HERE')} eq $input->{onclick}
}
You need to find what's happens after you select your radio button in the browser GUI. There are two ways for this:
you can check url() Javascript subroutine
or you can record your browser request after you submit target form.
I recommend to use Firefox's HTTPFox extension for this. So you just select you input, start the session in HTTPFox and submit the form. Next you check what data was POSTed (or GETed) and just replicate same fields
in your Mechanize script. Something like:
$mech->submit_form(
form_name => "form_name",
fields => {
input1_name => "value1",
input2_name => "value2",
.....
},
);
I had this issue too , and resolved it by calling a Javascript to click Radio Button.
$mech->eval_in_page('document.getElementById("id_radiobutton").checked = true;');
This worked for me.