I need to get one course on the university website.
However the enrollment is full and I can only get a seat if some other student drops this course.
I do not know the time when He/She will drop this course.
So I have to sit on this website for a whole day and click the enroll button until someone actually drops this course.
I have to make a software through node JS which can do this task for me at an interval of 5 seconds.
I am asking if there is an already available tool that I can use for this task.
setInterval(function () {
document.getElementById("BUTTON_ID").click();
}, 5000)
This functions simulates clicks at every 5 seconds. Replace BUTTON_ID with the enroll button's id, press F12 and try running this code in browser's console.
I've tested it on Firefox.
Related
Our NPO's Facebook page has a lot of fake fans brought in by the previous admin. I'd like to get rid of them so we can actually get some engagement from our real fans. The fake fans all liked our page at the same time andI can bring up a page on Facebook that has a ton of them in a row like so
https://www.facebook.com/browse/?type=page_fans&page_id=[MY PAGE ID]&start=800
But on that page are non traditional drop-down menus with autogenerated ids. The only option there I can see is to record a mouse position macro to click the menu then 'Remove from Page Likes' then 'Confirm' and repeat. This is slow and after about 30 it goes out of alignment and clicks thin air.
I had a look at iMacros to do things faster but after recording the macro then running it:
EVENT TYPE=CLICK SELECTOR="#u_0_d" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#u_0_b>DIV>UL>LI:nth-of-type(2)>A>SPAN>SPAN" BUTTON=0
EVENT TYPE=KEYPRESS SELECTOR="#u_o_1>DIV:nth-of-type(3)>BUTTON" KEY=13`
Leads to an error:
RuntimeError:
Can not locate element specified by selector "#u_o_1>DIV:nth-of-type(3)>BUTTON",
line 6 (Error code: -921)
I'm assuming that it's because an id has changed between the person I removed when recording and the next person the script is trying to run on. However I'm not sure what I have to change to make it just click or press Enter on whatever button is there on the screen
Can anybody help? Thanks!
I made a form using Intalio's AJAX Widget tool but I was confused once I wanted to add the form to a user's pool.
I actually followed this tutorial from Intalio's website. In the 5th slide, they mentioned the ways of adding the form (initProcess, create and complete, notify, escalate):
but no further explanations were given.
So, I would like to know the differences between each one of these ways and when should I use one way and not the other.
You use the initProcess if that form will actually kick off a process. Doing so will show a new entry on the web site front end in the Workflow>Processes category. It's what you can see in slide 6. Connect the form to the process.
Use create and complete if you want to give a user or group of users a task to complete. This shows up in the Workflow>Tasks section on the website. It locks your process until a user completes the task or a deadline is hit.
Use notify if you want to send a form as a notification to a user. This shows up in the Workflow>Notifications section. User can only dismiss it. It does not lock you process. It basically just triggers the notification and moves on.
You can use escalate to reassign an existing form to another user or group. This basically sits between the create and complete part of the form, gets triggered by an external message/event and lets you reassign the form.
Hope this helps. Cheers.
Alright, firstly, I love this module (More Buttons Module, v7.x-1.0-beta1) and it's working pretty good for me in most cases, but I have a scenario that it isn't quite doing what I need.
I'm using the Drupal 7 Forums, and when I go to create a new topic, it is added from /node/add/forum/133 (for example) -- Then when I hit cancel (from "More Buttons" module, of course) it redirects me to /node/add -- which I don't want at all, and don't want visitors to be able to get to even.
Ideally, I would get redirected back to where I first came from to initiate the New Topic in the forum, for example, /forums/general-discussion, then I hit "New Topic" and it takes you to the Add New Forum Post page, where if I hit cancel, I'd love to go back to /forums/general-discussion, not /node/add page.
Is that doable?
I have a Selenium IDE (version 1.7.2) test that I use to test the registration flow on my site.
In this test, I simulate signing up for several different accounts. To do this, I recorded myself signing up for several accounts.
When I play the tests back, some of the accounts are registered ok, but other times the Submit button is clicked (the action turns yellow in the IDE) but it hangs, refusing to fail (turn red) or go on. However, if I manually click the submit button in the browser window again during the test, the test will continue and it will mark the submit button green as if it passed correctly.
How can I get it to click the submit button correctly the first time? Or is there a way to automatically get it to re-click if it times out?
Are you using clickAndWait??if yes then change it to click and put pause after click command.Or try to locate element by different ways, or hit enter to submit form as
`keyDown | locator of element/last field | \13`
as twall suggested
Did you use the command waitForElementPresent before calling the click command ?
I have found out that is more secure to just sendKeys("\n") (simulationg an 'enter' key press) instead of using click() when filling out forms. Don't ask me why, but it was a big relieve to me, after I had found out.
Okay so first off, sorry if the title doesn't make much sense...I'm not sure how else to summarize it!
So here's the issue:
I am using jQuery to attach a click event to my form's submit button. The jQuery click event triggers some GA code to track a virtual page view so I can use it as a step in a Goal funnel.
But what happens is that there's no delay between the GA code executing and the submit, so I'm concerned that GA isn't actually getting the data.
When I look at what's happening in firebug or httpfox (browser addons that look at the requests/response) vs. charles proxy (external sniffer, separate from browser) I am seeing two different things.
With firebug/httpfox I see the GET request to GA but status of 0 and it is showing up as
(Aborted) NS_BINDING_ABORTED
...though it does show bytes having been sent etc.. just nothing for response.
But with charles proxy, I am seeing the same GET request with a status of 200 and the 1x1 pixel response.
So my theory here is that GA is receiving the data, but that the browser is moving on before it gets the actual response - which I'm okay with, as long as GA is getting the data, I'm okay with this. But it is just my theory and I don't know...
I know I can write the code to simply delay the execution of the submit by 500ms or whatever as insurance, but I don't wanna have to do that if it's not necessary..
And I know if nothing else I can just see if the data is showing up in GA but GA has a 24-48 hour delay on data so it is hard to QA.
Does anybody know or have any suggestions from experience...has anybody else experienced this "abort" thing and can say one way or the other if it is necessary to delay the submit or whatever?
HTTPFox is not a real sniffer. It just tries to mimic one. So the data you see on it is not always what is really happening in the background. Charles should get you a better picture. If you're seeing the 200 code in Charles. So the chances are that the hit is going through.
The bad news is that when you fire hits at the time the page unloads. (Outbound clicks, insite link clicks, form submissions, window.unload, etc) they won't go through every now and then. This happens because the Google Analytics JS Call basically appends a GIF to the page. And it returns after that. Than the browser will load the gif. When the code returns the browser is free to go, and if it goes away from the page it will cancel any pending requests that it may have, including that small GIF image. So the browser might haven't sent the tracking code, or might have sent it, but the TCP connection didn't go through and the browser would need to resend the package, but he's not willing to do it anymore.
So if accuracy is a need for you, you should add a 200-500 ms delay to it. But remember that Google analytics is not an Accuracy Tool, and if some events don't go through it won't probably affect the final outcome of your analysis.
According to the informatin on this page: Sending Data to Google Analytics there is a possibility that your data is not really being sent (the bad news, as Eduardo said). Transcribing the most important information of that page, related to your doubts:
Many browsers stop executing JavaScript as soon as the page starts
unloading, which means your analytics.js commands to send hits may
never run.
An example of this is when you want to send an event to Google
Analytics to record that a user clicked on a form's submit button. In
most cases, clicking the submit button will immediately start loading
the next page, and any ga('send', ...) commands will not run.
The solution to this is to intercept the event to stop the page from
unloading. You can then send your hit to Google Analytics as usual,
and once the hit is done being sent, you can resubmit the form
programmatically.