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.
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.
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?
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.
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.
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
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.
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
@@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?
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.
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"?
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.
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())
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.
@@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 :)
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!
@@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.
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!
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..
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.
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 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?
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
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?
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
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?
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/
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?
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?
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
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.
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
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.
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
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?
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?
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"
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?
@@asoyoyukii3902 I used this code to subscribe to the channel: document.querySelector('#subscribe-button > ytd-subscribe-button-renderer > tp-yt-paper-button').click()
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 😍😍😍😍
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!
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.
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?
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
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?
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?
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!
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.
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.
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?
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.
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.
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.
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 ?
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.
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.
@@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 ??
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)