Тёмный

How to Automate Browser Tasks with JavaScript 

edutechional
Подписаться 42 тыс.
Просмотров 207 тыс.
50% 1

Опубликовано:

 

29 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 342   
@marcostrevinorodriguez1254
@marcostrevinorodriguez1254 3 месяца назад
Ran with an issue about the spaces in between the class name, fixed them by adding points instead of spaces to separate each one of them. Great video man.
@NuncNuncNuncNunc
@NuncNuncNuncNunc 2 года назад
Tip for anyone new to scripting in the browser debugger: don't use 'const' unless you really mean to never use that symbol without refreshing the page. More often than not, you'll want to redefine a variable as you try different things.
@Syffx.
@Syffx. 7 месяцев назад
No
@NuncNuncNuncNunc
@NuncNuncNuncNunc 7 месяцев назад
@@Syffx. Is "No" a question?
@AivarDielupovissa
@AivarDielupovissa 2 года назад
How can I automate the selection with mouse and past it on other file.
@chuhaoliu5050
@chuhaoliu5050 2 года назад
Very clear, easy to understand and easy to apply to real life. Thanks a ton!
@caroldanvers265
@caroldanvers265 2 года назад
Thank you for the tutorial. This was very informative and now I can automate a project.
@seohelpers5013
@seohelpers5013 6 лет назад
I make automation solutions but after seeing this ability with javascript i am very surprised. Really love this and the way you explained. Thanks.
@lucascardoso9516
@lucascardoso9516 5 лет назад
How can I click in just a single button without "id", using class to select it?
@GreatNewo
@GreatNewo 4 года назад
So I am clicking all these links to open up trade tabs in my browsers for a game and when I am clicking my items I have to click there items but if they have a lot then I have to find them by clicking the arrow button so Is there something I can do with find this specific item but if it can’t find it go to the next page?
@edutechional
@edutechional 4 года назад
For that you'd want to have a conditional that checks to see if the link exists, and if not, to click on the pagination link.
@ravindrabit2k7
@ravindrabit2k7 4 года назад
I was looking solution like for whole last week and found the solution, now youtube suggested me this video. Why youtube?? Anyways always there is something more to learn here, thanks.
@edutechional
@edutechional 4 года назад
Glad I could help
@SaawanSingh
@SaawanSingh 4 года назад
Not able to work with Class Name on a website. Please suggest a method for clicking buttons using their IDs..
@edutechional
@edutechional 4 года назад
For that you just use "#" ID selector instead of the "." class selector.
@SaawanSingh
@SaawanSingh 4 года назад
@@edutechional Thanks for replying. I will try doing this. Might need your help with writing an HTML code for auto-login..!
@SaawanSingh
@SaawanSingh 4 года назад
@@edutechional Looking forward to learning more from your videos..
@ericdango2583
@ericdango2583 7 месяцев назад
Thank you sir, is it possible to make this an extension
@ishmaelroots654
@ishmaelroots654 Месяц назад
Total noob here, it ought to be possible. I only say so because training websites like Scrimba teach you how to turn JS into extensions
@attatahir
@attatahir 5 лет назад
Hi i need some suggestion i want to make a function, problem i am facing is after click a new small pop up windows open i want to click on another button and then close that and then run same process on other with in one div, so can you please temm me click ==> click Yes ==> Cross and repeat for all.
@edutechional
@edutechional 5 лет назад
If it changes windows, you wouldn't use something like this. This is for a contained window/document. If you have to work with multiple windows, you'd need to use more of an automation tool
@raph6709
@raph6709 4 года назад
Hey! I'd like to do that too. Did you find a way to do it ?
@alfckchung
@alfckchung 2 года назад
Thanks! Is there any way to run a script file? This will need to use the debug console every single time. Is building a chrome extension the only way?
@wilhelmberghammer7369
@wilhelmberghammer7369 4 года назад
Is it possible to do this with a script? So I can automate that and do this whenever I want with the push of a button. Thank you
@edutechional
@edutechional 4 года назад
You can store it in a function and call that anytime
@oozmakappa8895
@oozmakappa8895 3 года назад
@@edutechional how to storage the function on the browser?
@renatowgomes1
@renatowgomes1 6 лет назад
never imagined we could do that direct in Chrome!! thanks
@edutechional
@edutechional 6 лет назад
It can really help automate a number of processes!
@abdullatheef5117
@abdullatheef5117 3 года назад
Awsome..... Crucial information which other courses or tutorials doesn't give importance to. 😉
@elle4176
@elle4176 4 года назад
Hi is there a way we can make this script as google extension? how can the google extension read the elements of the active tab?
@edutechional
@edutechional 4 года назад
You can definitely integrate it into a Google extension, but building an extension is quite a bit more complex.
@souptiknath4668
@souptiknath4668 4 года назад
Now how can I store my automation code in a separate javascript file and run it when the website opens?
@kantaronin6391
@kantaronin6391 4 года назад
you can use Tampermonkey, Chrome extensiton, to do that easily.
@AllynVibes
@AllynVibes 4 года назад
Great video! I'd like to learn hown to move items from my Amazon Save for later items to a wish list. Do you have a video that might help? I have one script that does everthing but select the correct list from the pop up options.
@AllynVibes
@AllynVibes 4 года назад
Got it sometime in December! Found it, edited and it worked! Cleared Amazon Save For Later, and YT Watch Later for the new year.
@newtechlaunches2311
@newtechlaunches2311 4 года назад
Pls share the script link
@essmallgeemuhammadtwahirzu558
let constant = document.querySelectorAll( 'class' ) This takes all the button from the DOM constant.length This calculate the number of such buttons from the dom constant.forEach(btn => btn.click()) Then it perform the function
@zb4358
@zb4358 5 лет назад
Just subscribed to you using this method!
@edutechional
@edutechional 5 лет назад
Awesome!
@zb4358
@zb4358 5 лет назад
@@edutechional Hi ive got a question, if there is no unique class tag for the specific element you want to access what can you do? For example, the button to subscribe shares a class with other html elements which I do not want to click. I would have to getElementById() right? But what if there is no ID?
@edutechional
@edutechional 5 лет назад
If there is no id, you can go the other direction, and try to find a unique parent class or ID and then traverse the nodes back to the one that you want.
@alexisidro
@alexisidro 4 года назад
This is sorcery. Thank you for this video
@edutechional
@edutechional 4 года назад
You're very welcome
@fool4jc777
@fool4jc777 2 года назад
This is so helpful. Quick question...how do I create a JavaScript for a stopwatch/timer website to click on the timer option, type in 60 seconds, then click on "Set" and then "Start"?
@GJOneStudioLanguageTutors
@GJOneStudioLanguageTutors 5 лет назад
Hello... How to do copy task using javascript ? for eg. I have table data which contains 100 rows and I want to print that rows data on the console.
@edutechional
@edutechional 5 лет назад
You would just need to find the selector that would grab that data. So you'd select the table and then all of the rows inside of it and then you can store that data in a variable and run the copy() method with the variable passed inside of it.
@haginsmedia
@haginsmedia 2 года назад
Great tutorial. Thank you for such an amazing, straightforward content :)
@vaisakh_km
@vaisakh_km 4 года назад
i tried it for liking all comments of this video,but not worked can anyone fix it and replay >let d = document.querySelectorAll('.style-scope ytd-toggle- button-renderer style-text size-default') d.forEach(butn => butn.click())
@vaisakh_km
@vaisakh_km 4 года назад
also i tried to do subscribe as it is a unique element, but failed
@edutechional
@edutechional 4 года назад
It looks like you're trying to select too many classes, the value you pass to querySelectorAll needs to actually select the item or you won't have any node to work with.
@dijkstra4678
@dijkstra4678 3 года назад
I got you homie
@dijkstra4678
@dijkstra4678 3 года назад
let allike = document.querySelectorAll('#like-button') allike.forEach(btn => btn.children[0].children[0].children[0].click())
@yatrikamrutiya9376
@yatrikamrutiya9376 3 года назад
how can i run a JS code everytime the page reloads?? in console the script vanishes everytime the page is reloaded.
@simamorpho2641
@simamorpho2641 3 года назад
Selenium JavaScriptExecuter can prolly help
@fakrudheenkk8407
@fakrudheenkk8407 3 года назад
Use Tampermonkey or Greasemonkey extensions
@robertrydlewski9538
@robertrydlewski9538 5 лет назад
dude, You are the man !!!! Thanks a lot :)
@edutechional
@edutechional 5 лет назад
I'm glad that you found it helpful!
@nobledandyson2890
@nobledandyson2890 5 лет назад
hi robert can i use for facebook
@robertrydlewski9538
@robertrydlewski9538 5 лет назад
@@nobledandyson2890 Hi Noble. I think so, but quite frankly I am not sure. I am newbie, ( 4 months playing around) having that said I am not in position to give you definite answer. I think you should address this question to "edutechional", He definitely know what's up.. Let me know if you figure it out. I would be happy to see how is done. Happy coding buddy :)
@FredoCorleone
@FredoCorleone 5 лет назад
You should refresh the page right after to get other things to add and automate it with Tampermonkey or Puppetteer.
@edutechional
@edutechional 5 лет назад
Those are great options!
@jayaprakashnarayana6575
@jayaprakashnarayana6575 Год назад
Can you please tell me how to click the Enter button or keyboard event using javascript
@kantaronin6391
@kantaronin6391 4 года назад
Hi, before I watched this video, I actually created a script to automate sending invitations, but I've done too much and LinkedIn detected my account's unusual behavior. As a result, my account temporarily locked. I used random intervals to avoid that, but increasing too many connections can be detected. Everybody, be careful about that!
@edutechional
@edutechional 4 года назад
Thanks for sharing!
@RAP5428
@RAP5428 4 года назад
Did you get your account back?
@myerwerl
@myerwerl 4 года назад
How do you introduce intervals in conjunction with this tutorial? I want to automate clicking a button(every 4 hours) on my webpage.
@sebastienj7639
@sebastienj7639 2 года назад
@@myerwerl This is propbably hella late but you'd probably use a setInterval for this part. Turning the milliseconds into sec, then min, then hours, then the amount of hours you'd want.
@zaryangupta
@zaryangupta 3 года назад
is violentmonkey better than tampermonkey?
@jessep8281
@jessep8281 3 года назад
Now I wanna learn JavaScript because of this video.
@harshchauhan6299
@harshchauhan6299 3 года назад
Hi how to type in message textbox using javascript Element.innerHTML="Hi" Button.click() But click button doesnt work (in textbox of Linkedin)
@edutechional
@edutechional 3 года назад
That typically means that there's an issue with the selector
@harshchauhan6299
@harshchauhan6299 3 года назад
@@edutechional statically also this button not works
@l.j.2917
@l.j.2917 8 месяцев назад
And this will only work if I have Java Script installed right?
@mann_36
@mann_36 7 месяцев назад
no
@danstanongubo
@danstanongubo 3 года назад
How I have been able to manually do heavy tasks when such automations work, I have no idea. Thank God I found this! Was already overwhelmed by repetitive tasks. Thanks!
@iliketocode6986
@iliketocode6986 4 года назад
is it possible to make auto reply?
@edutechional
@edutechional 4 года назад
That would be a bit extensive for a stand alone script. For something like that I'd use a full automation tool.
@orelcohen6593
@orelcohen6593 4 года назад
Hi, thanks, useful video.. i hav a q - it's possible to access it from outside program? i want do a script that go to specipic url, find element and do some clicks.. i know about selenium and so, but i search for somthing that dont need reload new tab in any run..
@edutechional
@edutechional 4 года назад
Yes, for that you'd want to use either a tool like selenium, or more of a scripting language, such as Python or Ruby.
@ravindrabit2k7
@ravindrabit2k7 4 года назад
Use selenium with python, in python you can call the URL, save it in driver, you can write javascript code and execute it in python with the driver. It works fine.
@thomassteindl9481
@thomassteindl9481 4 года назад
Thanks for the clear instructions. Just one thing that I don't understand yet. This code is inserted in the console ON the site, on the relevant URL/route. But could we also write a script that automatically moves to the relevant URL and does the job we have programmed? I'm thinking of some kind of cron job. My use case is a site where I need to check bid prices of a digital product and adapt the prices/keywords seperately which is very time consuming and tiring (600+ keywords).
@edutechional
@edutechional 4 года назад
For something like that, you'd want to use a full automation tool.
@thomassteindl9481
@thomassteindl9481 4 года назад
@@edutechional thanks for your reply and sorry for my follow-up (this topic is pretty new to me obviously ;) would this be something Selenium (this pops up on a lot of searches for this topic) can do or would/could you name/recommend any other tool?
@_m..
@_m.. 2 года назад
Is this possible I want to make a bot that generates a random 4 letters and search for it in (yopmail) and then it searches for a specific word in the email and if it found something it should send that 4 letters to me and if the mail is empty the bot will generates a new word of 4 letters and search again until i turn it off
@schulbus13
@schulbus13 4 года назад
Thanks for the clear explanation. 👍🏻 I played around with Soundcloud likes and reposts and it worked perfectly
@edutechional
@edutechional 4 года назад
Awesome!
@leebeatzz
@leebeatzz 3 года назад
Had a question: I have client who wants to add a job board page in squarespace. More details: The thing is when a job recruiter fills out and submits a job, she then wants to approve it, and upon approval she wants the job submission to auto populate on the job board page. I know I’ll have to implement code, but lines of code do you suggest? I’ll implement code with the squarespace platform. I just need a point of attack. I’m stuck. I’m looking for the fastest way using squarespace?
@edutechional
@edutechional 3 года назад
I have never worked with Squarespace. I'm pretty sure you could use a plugin such as Powr.io or TypeForm for that type of functionality.
@happychuckprogramming6048
@happychuckprogramming6048 5 лет назад
nice vid...
@fakefake6770
@fakefake6770 2 года назад
Hey nice video! I have a question...how can I click a certain button on a website just by the time it appears? So the script should detect when the button appears and the click on it... I tried with tamper monkey
@mohammedtouati3855
@mohammedtouati3855 5 лет назад
Damn it man, I was looking for this for a very long time, it's a very powerful tool thanks a bunch
@edutechional
@edutechional 5 лет назад
I'm glad that you found it helpful!
@hillaryeatsbabies3701
@hillaryeatsbabies3701 3 года назад
How would you add this to tampermonkey? It works inside the console when the popup is already there. But when I add it to tampermonkey as a script, and reload the page, the popup doesn't close. Any thoughts?
@edutechional
@edutechional 3 года назад
It's going to be unique for each site, but reloading the page will cause the console session to refresh. For something like that, you would want to use a tool that can work between pages, there are quite a few Chrome extension that can do that: www.maketecheasier.com/extensions-automating-repetitive-browsing-tasks/
@r.prajapat42
@r.prajapat42 2 года назад
My office account login page auto reload insted login, after filling username and password in tag . Can anyone please help.
@rohandevaki4349
@rohandevaki4349 4 года назад
Sir what if the class names change , for the next update of the linkedin website, then again we need to see the class name and do right?, instead of that can we use other way, which is consistent?
@edutechional
@edutechional 4 года назад
Correct, if you're using the class name as the selector you'd need to update the script.
@yousseftazit8477
@yousseftazit8477 4 года назад
it works, Thank you so much!
@edutechional
@edutechional 4 года назад
You're welcome!
@Christ4ever86
@Christ4ever86 Год назад
Will this work with links on a page? Say that I have several clickable text elements on a page; Is there a way to use something like this to find all of the ones that have certain text within the url and select those? Currently, I keep getting "thing I typed is not a valid selector" error. If I search for the class; Will it be able to select the text without a button element?
@clobbis174
@clobbis174 5 лет назад
Hiya mate, really effective video! I'm currently stuck looking for a button and feel like this is really simple to resolve but struggling to find answers, i've found the location of the button but i think its been grouped by
@edutechional
@edutechional 5 лет назад
I'd start by inspecting the element using the browser tools. That will show you if the button has a class/id, and if it doesn't, it will show the closest parent element that you can select.
@Unoo13
@Unoo13 2 года назад
If i get it right: document.querySelectorAll - mainly been used for static objects document.getElementsByTagName - can be used for dinamick objects like divs also it`s easier to use something like document.getElementsByClassName to find what you want
@Unoo13
@Unoo13 2 года назад
But it`s creating another problem, you can`t use method "forEach" it`s simply not working with divs
@MrDesertWings
@MrDesertWings 4 года назад
use this for clicking the are you still watching button on yt
@liameneuk
@liameneuk 9 месяцев назад
But how do u "pack" the codes to make them reusable without writing them every single time?
@browserautomate
@browserautomate 8 месяцев назад
By extension like automa or ui vision
@gvlad19
@gvlad19 4 года назад
Hello ! Can you help me please with a similar code for facebook: auto click all Like Buttons from a page ? Thank you very much !
@edutechional
@edutechional 4 года назад
Doing that for Facebook Like buttons will be challenging, they dynamically change the like button class name to prevent automated behavior. Sites like that want devs to use their API.
@aliakhlakmilon6056
@aliakhlakmilon6056 3 года назад
@@edutechional challenging, but not impossible
@jingli9232
@jingli9232 2 года назад
amazing content, can we get more automation tutorials
@sambit1suranjan
@sambit1suranjan 5 лет назад
I have an excel list of video titles. How can I automatically search them all in youtube and add the first result in each case to a RU-vid Playlist
@PigNe0
@PigNe0 3 года назад
what if they aren't considered buttons? What do you do when they are links?
@edutechional
@edutechional 3 года назад
You can call the click function on buttons and links pretty much the same way in JavaScript, you just need to select the link via an id, class, selector, etc
@laeqasghar8645
@laeqasghar8645 4 года назад
How to copy from one website to another automated?...i have to copy latitude and longitude from one website to another site's predesigned boxes.
@newtechlaunches2311
@newtechlaunches2311 4 года назад
Can u pls make addtocart button script for me for shopping sites like amazon
@ZillionFundz
@ZillionFundz Месяц назад
Please what if I want a bunch of followers for myself, how do I do that? I mean to ask what if I want a number of users to follow me, please how do I implement that?
@Beatboxerskills
@Beatboxerskills 4 года назад
so how would you put this into ann application or programm?
@syderwolf7800
@syderwolf7800 3 года назад
Would this still work with bing and not just google?
@edutechional
@edutechional 3 года назад
Yes, you would just have to update the selectors
@ericlks91
@ericlks91 3 года назад
How do i automate clicking a button before the page loads completely? I want to be fast and not wait for while page to load. I was using Windows.addeventlistener(load) but it's too slow. Any way to refresh the page and instant click on button?
@anthonylee5810
@anthonylee5810 Год назад
trying to use this to automate drop down menu options where all of the drop downs are the same option is there a way to 1. narrow down to just the drop downs i need as a selector and 2. make each of these select " pass" instead of making all selected elements "click"
@greendog105
@greendog105 2 года назад
did exatcly that and nothing happened, also many things in the page's code is now changed 2022
@NPC-tm3gt
@NPC-tm3gt 5 лет назад
So im trying to automate a task at work, and im wondering if theres anyway to send data from the console of one webpage to the console of another web page. The task i am trying to automate consists of a website that has a prefilled form. I need to get elements from this form, and then copy them into another totally different website. Ive already written a script that pulls the data i need from the form and displays them in the console. Now i need to find a way to send them to the other page’s console. Is this possible?
@edutechional
@edutechional 5 лет назад
That's not something that javascript would be able to do, for something like that I'd start with trying a tool such as selenium or building a scraper
@pinguin472
@pinguin472 4 года назад
I used this to suscribe ;)
@edutechional
@edutechional 4 года назад
Ha, very nice!
@asoyoyukii3902
@asoyoyukii3902 4 года назад
can you share the code, please
@pinguin472
@pinguin472 4 года назад
@@asoyoyukii3902 I don't remember sorry
@PedroSilva-of8tz
@PedroSilva-of8tz 3 года назад
@@asoyoyukii3902 I used this code to subscribe to the channel: document.querySelector('#subscribe-button > ytd-subscribe-button-renderer > tp-yt-paper-button').click()
@rudythorns8411
@rudythorns8411 Год назад
Wow thas amazing .... this video mde me rialize that have a big gap in my knowledge or am i lazy enough that i only know how to build and not to automate😓 this idea widen my horizon 😍😍😍😍
@BiebenidoCepeda
@BiebenidoCepeda 11 месяцев назад
The record feature in Hidemyacc's automation is a true gem! Being able to export those actions into scripts has made my workflow smoother and more streamlined. Kudos to the developers!
@dre429
@dre429 3 года назад
I have issues initializing variables in the chrome console, any work around?
@edutechional
@edutechional 3 года назад
The console is slightly different than javascript, you don't technically need to use variable type names such as const, let, or var. You can just provide the variable name.
@paz1359
@paz1359 6 лет назад
how can I do this if I have a link of a page?
@sariyubilihaminu3711
@sariyubilihaminu3711 Год назад
Thanks very much for the tutorial. I have really learned a lot but a question remains, how can I make it work at intervals even when I'm not working on my PC, or when I'm offline?
@feeshmaster9353
@feeshmaster9353 Год назад
YES PLEASE I NEED THAT TOO
@MoMo-fz9ci
@MoMo-fz9ci 3 года назад
Would be enough to use such combination in automating a lot of tasks ? I mean activities with 1000+ clicks and keyboard as well
@vmars316
@vmars316 4 года назад
Hello & Thanks; Is it possible to use .js to reject (no go to) a website showing in the address bar ? Perhaps have a list of allowable sites . If not in the list , then can't go there . THANKS
@edutechional
@edutechional 4 года назад
Not with a simple JS script, going to URLs is managed by the browser itself.
@hammockguy
@hammockguy 3 года назад
thats so powerful Thank you !
@edutechional
@edutechional 3 года назад
You're welcome!
@jorgeramos7336
@jorgeramos7336 8 месяцев назад
Thank you so much for this, I truly believe I can get to where I'm trying to but have had no luck so far looking getting more info. I have a smiliar task but mine conssists in two key diferences. 1. I need to do a series of consecutive actions each of which, depend on the value or result from the previous action. Said result most of the time happens to be an dynamic element of the same browser. 2. I need to run the script on multiple browser tabs, none of which are interdependent with one another. I already have a concept map of each command. Is there any source you I could look into for this?
@ashwina.k5602
@ashwina.k5602 3 года назад
Great tutorial! I was wondering, what if I had to enter text into a webform, can that be achieved using the developer console? What if that data is coming from a csv file?
@edutechional
@edutechional 3 года назад
You can definitely fill out a web form, it would be trickier interacting with a csv file though
@skkevinperson
@skkevinperson 2 года назад
@@edutechional I also came to this video looking to do exactly this. Would you be willing to do a video on that topic as well?
@ShayRubachOfficial
@ShayRubachOfficial 4 года назад
Great video! Assuming you always know the class names and they don't change, is there an option to write a generic js code that will run on every page I browse to? Does it have to/can be introduced as a Chrome Extension for example? Or there's a far more simpler way to implement this? Thanks!
@edutechional
@edutechional 4 года назад
You'll need to have some way of telling the script the element to select, and the class or id is the standard way of doing that
@goosechaser
@goosechaser Год назад
Thanks
@EdwinDevey
@EdwinDevey 3 года назад
Great tutorial. I've just started to study javascript to help with a hobby and I think this is the first time I've full understood a tutorial. Do you think I might be able to adapt this to select those buttons already selected and call them to repeat? Basically, to just re-run over the list of selections. I have an application where the user can select from a group of buttons to build up a group in sequence. Once they have chosen the sequence, I would like them to be able to click on another button to run that sequence again with out further clicks except for the RUN button.
@edutechional
@edutechional 3 года назад
I'm glad that you found it helpful! And absolutely, you can do that, just be careful, many sites will view that type of behavior as spam and block it or even block the account.
@realentertainment825
@realentertainment825 4 года назад
How we can make apply thes kinds of condition in website to follow my instagram telegrams account...
@TheLongBow
@TheLongBow 4 года назад
There are bunch of softwares to do this, example- RoboTask
@briathomas5310
@briathomas5310 4 года назад
Is there a way to slow down the process? Some sites, but especially apps get suspicious of things like that. Can we set a timer between follows?
@edutechional
@edutechional 4 года назад
You can always set up an interval function to delay it: www.w3schools.com/jsref/met_win_setinterval.asp
@markoschris4085
@markoschris4085 4 года назад
i want to create a macro so that when i press a specific button on my keyboard to activate the macro it will click on a specific button in the website that im in how can i do that?
@cristhianvalencia5793
@cristhianvalencia5793 4 года назад
maybe selenium?
@indiansoftwareengineer4899
@indiansoftwareengineer4899 5 лет назад
you have got a new Subscriber, GD(me). thank you for this tutorial.
@edutechional
@edutechional 5 лет назад
Awesome!
@maxb5351
@maxb5351 3 года назад
Is it possible to bypass bot protection and emulating a real User using only requests and Posts in Node ja?
@gromitj
@gromitj 10 месяцев назад
This is like a lesson in how to get banned from LinkedIn. I get that it's a tutorial, however LinkedIn doesn't tolerate bots and regularly bans developers.
@browserautomate
@browserautomate 8 месяцев назад
you should not use exactly this method just put random delay between click.
@mengxueli3856
@mengxueli3856 3 года назад
thanks for the post, looks great. But can you give some help. I do: let btns = document.querySelectorAll('full-width artdeco-button artdeco-button--2 artdeco-button--full artdeco-button--secondary ember-view') or let btns = document.querySelectorAll('full-width artdeco-button') but the btns.length is always 0.
@edutechional
@edutechional 3 года назад
If those names are classes or ids, the querySelectorAll function needs to be passed the selector with its full class signature, e.g.: document.querySelectorAll('.full-width .artdeco-button') If you don't have the 'dots' for class names, javascript thinks that you are looking for tags with those names, but it sounds like you're looking for class names.
@mengxueli3856
@mengxueli3856 3 года назад
@@edutechional thank you for the prompt reply, this time is works. thank you so much.
@factsforfacts7726
@factsforfacts7726 3 года назад
Please make a tutorial how to automate system tasks in JavaScript
@edutechional
@edutechional 3 года назад
JavaScript isn't really ideal for automating system tasks, for that you'd want to use tools such as bash scripts
@factsforfacts7726
@factsforfacts7726 3 года назад
@@edutechional thank you very much I just a beginner 😀
@sharifyy
@sharifyy 4 года назад
great video. Is it possible to click on an exact time? let's say I want to initiate click event on 09:00:00:00. the milliseconds are important
@edutechional
@edutechional 4 года назад
You could use a setTimeout function.
@paulosilva-dm1qb
@paulosilva-dm1qb Год назад
Excellent....But what if the document requires a field to be filled and keyUp event to start??? How do u simulate it?
@browserautomate
@browserautomate 8 месяцев назад
use ui vision or automa extension of chrome
@alainrodriguezz
@alainrodriguezz 4 года назад
Awesome! Love JavaScript automation ❤️
@edutechional
@edutechional 4 года назад
Me too!
@Nick-cx4rs
@Nick-cx4rs Год назад
A website has Form - textArea - Button --- > when i typing in textarea manually and click button --> everything is ok form posting textarea value. But when I change textArea value with javascript like :: textArea.value = 'example value' . On screen textarea value changing successfully. But the form is not submitting this value changed by javascript code. Any way to fix this ? Anyone can help me ?
@slingshot7602
@slingshot7602 3 года назад
Nice. I liked it
@raakeshkapoor3702
@raakeshkapoor3702 5 лет назад
You are the man. Can you please help me with a small query. When I try to Subscribe you using this method then I can see class which is shared among many other elements. Can you please suggest the method that I need to follow for the same.
@edutechional
@edutechional 5 лет назад
I'd start out by right clicking on the link that you're wanting to have the script press, and then test out selecting those elements and calling click() on them to see if you selected the right one.
@raph6709
@raph6709 4 года назад
@@edutechional Hey ! I have the same problem than Raakesh, it's been few hours I'm trying to select each class matching with the RU-vid subscribe button but it didn't work :'( Anyone can help me plz ??
@goldenhell9
@goldenhell9 3 года назад
subscribe = document.querySelector('.ytd-subscribe-button-renderer') subscribe.Click()
@Joe-vr4ow
@Joe-vr4ow 5 лет назад
I don't understand how you know what portion of the string to use in the query. I've used every possibility and the array returns empty every time.
@mauritzfunke280
@mauritzfunke280 5 лет назад
make sure you have a dot before the class name. If the class is "btn" you have to write document.querySelectorAll(".btn")
@edutechional
@edutechional 5 лет назад
That's great advice, thanks!
@DarthLeuan
@DarthLeuan 5 лет назад
But, if I want an applicattion to do this, how do I use a Document form another website?
@edutechional
@edutechional 4 года назад
For that you'd need to use a different type of cool such as Selenium or a tool specific to the language if you're building it for an app.
@MoonKnight-ej5ol
@MoonKnight-ej5ol 6 месяцев назад
Is there a way I can make this process happen without opening the page. Earlier I had a similar situation I wanted to fill data in some input fields and it was the same data for every page so I made a chrome extension that targeted those specific fields and filled them with a single click on the extension popup page.(It would help even more if I didn't even have to open the browser)
@jaco5232
@jaco5232 3 года назад
This works out real good!
@jgrav3473
@jgrav3473 4 года назад
Does this work the same with other websites?
@wail7815
@wail7815 4 года назад
Yes just you have to change the class of element
@keerthimmmmmmmmm
@keerthimmmmmmmmm 2 года назад
Hello sir, can u pls tell me about VP macro Javascript ?
@zahidali195p
@zahidali195p 3 года назад
how can I add time breaks in btn click action?
@edutechional
@edutechional 3 года назад
You can wrap the whole process in a setInterval function
Далее
Selenium Browser Automation in Python
21:38
Просмотров 230 тыс.
Ледник 1:0 Мужик
00:53
Просмотров 1,5 млн
The TRIPLE FOLDING phone has a Problem.
12:54
Просмотров 2,3 млн
Web Scraping like a GOD with Javascript
8:17
Просмотров 54 тыс.
Selenium Javascript Tutorial For Beginners
40:31
Просмотров 112 тыс.
I Used AI To Build This $900K/mo App In A Day
21:48
Просмотров 332 тыс.