How to Automate Data Entry on Chrome Browser using excel macros
Вставка
- Опубліковано 6 січ 2019
- In this video we would learn
1. Automated Data Entry on Chrome Browser using excel macros
2. Configuration of Excel VBA with Selenium
3. Execution of Selenium scripts using Excel VBA
Looking for a option to use Chrome from within VBA and finally got the right one.
It works for me.
Thank you so much,
Your welcome
i have an excel having multiple records of employees and have to feed in web form how will i do that
Satish from Saudi Arabia. It was really a helpful Video. It has ended my search since last couple of days. Thanks for such a nice explanation.
your welcome.
Thanks again mate, this knowledge will be very usefull to me.
I already have a good VBA knowledge, so I can imagine how easy it will be to upload required personal information of about 500 students, using Do While or For Loop.
I might need some sleep fuction in the middle of the code, I will check your other videos, im sure they will help on that too!
Thanks again and best regards from Nazaré, Portugal! 🌊🌊🌊
Great to hear!
thank you very much i've been searching for this videos for days
your welcome
Bro many tonnes thanks to you, your video was light to my path feeling blessed
Your welcome. Happy you found it helpful.
Thanks a lot Dear.. I mean u have explained everything and I am so happy..
1st time only I understand this code and I perform the same as well and it's worked
Can you also tell us how to wait till page get load
Excelente explicación, lo que me enseñaste hoy, me será de gran utilidad.
Congratulations for a good job!
Thank You
You are a very good teacher. Thanks
Your welcome
Very clear tutorial. Thank you.
Your welcome
Thank you very much, brother. No one is telling about the chrome driver part
your welcome
love the way define the things , thanks to thinking like a learner not a expertise
thank you
This Video changed my life :)
Glad it helped :)
This is awesome! Thank you so much for sharing =)
Glad you liked it!
Thanks! Helped a lot.
You're welcome!
works like a charm
thank you
Thank you very much! I have one question. How do I change the range so the value does not equal A1, but equals the active cell?
Thak you very much for the help.... WORKS IN CROME BROWSER AS WELL WITH IE EXTENSION
ur welcome
Perfect!
Great, Thanks a lot brother
Your welcome
I've been searching for this for hours and I'm sure you're solution is the one that will work for me. Thank you for sharing this, excellent material!
I'm stuck at the begining though, I get Runtime error 91 "object variable or with block variable not set". The error displays while trying to run this line: obj.Start "chrome", "".
I've installed dot net fw 3.5 and of course the selenium library is selected in references. I'm using chrome 91 with 91 chromedriver. Did I miss any other steps?
Thank you again! Great job!! Keep up the good work!
My gut feeling says you must have missed the 'New' keyword in the first line. It must read as:
Dim obj As New WebDriver
If this is not the root cause of the issue please paste your script here and I will look into it.
@@AutomationMadeEasy I faced the same error now. I used everything as said in the video
@@AutomationMadeEasy I just followed all of the steps. I am using driver 108.0.5359.71 in Selenium. And the version of Chrome that I have is 108.0.5359.125 (Official Build)(64-bit). And I am getting the same error where it will not open chrome with the line obj.Start "chrome", "". So I got stuck on this step so far.
Thanks bro
Its really helpful
Glad to hear that
Very detailed and a clear explanation. Thank you very much. How do you make it to go in a loop, picking values from excel, say from row-1 the first time, then from row-2, etc.?
thanks you will find examples on the blog automationandagile
Awesome ... Thank you....
Glad you liked it!
Nice Thanks Alot................ Kudos
Your welcome
awesome awesome man...
Glad you liked it!
Hi, is that possible to make the Automate Data Entry on Postman tool using excel macros?
I wanted to use the service call through web form from the Postman tool.
very good explanation
Thank you
Good Explanation Bro, But there is disturbance in voice. Try to improve that. Thanks
Thank you so much 🙏🙏🙏🙏🙏🙏🙏🙏🙏 u r pro Max player bro
Welcome 😊
Very good information
Thank you
Hello Bro,
Could you help with For loop for the same to enter multiple information from an excel to website?
same question
Eu to com uma versao chrome instalada 107.0.5304.107 porem no site do chromedriver so tem ate a 107.0.5304.62 e nao ficou compativel a chamada do chrome via macro mesmo usando a biblioteca do seleniun dentro do VBA.
Esta versao ".107" parece que nao existe o "chromedriver", tambem nao tem como eu instalar uma versao do Chrome pois a maquina é gerencida pela empresa, isto e, so posso usar a versao oficial do Chrome instalada na empresa e esta seria a ".107". Alguma sugestao quanto ao chromedriver de versao nao existente?
Thank you for your suggestion. How to do this from fill in already opened chrome page
Hi Sir, so I have lists of data on an excel spreadsheet with People's Names, Surnames, Phone Number, date of birth, Email etc. I need to capture each person on our database on chrome. Is there a way to Automate this? Have you done a video on this already?
Can you automate the system to change its IP Address from excel sheet?
Great video
Glad you enjoyed it
Do you have another video explaining how to change other types of controls aside of data entry like: combo boxes, date boxes, check box etc.?
For combo box use below syntax:
obj.FindElementById("id of element").AsSelect.SelectByText("text of item you need to select")
for checkboxes and radio buttons .click will work.
Now how to know when the full web page is loaded, can you help me
Thank you very much for this video, it is really helpful! I've been using IE so far because I thought it wasn't possible to command Chrome using VBA until now.
I have a question : Is it possible to command Chrome without making it visible ? (for IE, it's ie.visible = false)
I sometimes need to download a bunch of files by entering URLs in Chrome. It works fine, but I can't do anything else at the same time while the program is running.
Thanks. For executing in invisible mode you will have to use phantom.js. You would find it in the location where Seleniumbasic got installed. Its not straightforward as in the case of IE.
@@AutomationMadeEasy Thank you so much for your tip! I will try it!
How to initiate chrome link with automated login credentials. I need to fill data from excel into CRM
BDW very nice explanation!!
Hi do you have video for opening multiple tabs in chrome and populating it with data from excel?
How to wait until webpage has fully loaded? Please help! (like Do While IE.busy)
Bro I want to auto click on sign in button by a single keyboard key clicking shortcut.. only for sugnin or submit or send or any similar in a chrome website which is already opened..
Can you please post a video on how to automate Chrome or FireFox browsers without using Selenium?
Launching them is not an issue but what we need to accomplish is to upload data on already open FireFox or Chrome browsers.
At work, I did some automation using IE and would like to make that work in Chrome/FireFox but Selenium is not allowed. I wonder if there is a way to do it with the basics.
Sir brilliant , one thing if I want to download data after login page, supposes I open my net banking then I want to download statement. Sir what code i use this for. Please make this video thanks
very educational video
Thank you
great video
thanks
Thank you for your valuable contribution. Unfortunately, Google Chrome does not allows Selenium to be downloaded! Is there an alternative which can still work with VBA?
Required google chrome driver as well..
Hi... I have a web page which has a hover section leads & it has two sub menus - submit & edit.... So basically I wanna click on leads & then on submit.... So how will I able to do that?
This was only one data you used here but in data entry job there was multiple data i need to enter please help me to do that
Hi There, Its definitely a great video. Thank you very much.
I have a requirement, where i will have to login to a page, click on a button and then a form opens where i am supposed to fill data from excel. Post to the data fill i have to verify and do some manual entry and then click on a button to go to a second page where again i have to populate some data on the next page. How do you advise about achieving it?
If i had to use IE, it was a piece of task as i had Sub defined for each page and after the loading of specific pages i used to just click a button (mapped with corresponding sub). Any similar approach you could advise?
Put a message box (MsgBox "Wait") just before the point where you need manual intervention. Once manual updates are done click on the message box. Execution will continue go to the next page and do automated data entry.
You can also add wait time for to load your form.
Hi
How to fetch or get the emailid with selenium vba from any webpages or website
Can you please explain how to enter data if there are multiple rows and multiple columns.
I tried to perform iteration but not successful.
Hello very nice video!
1 Question: Is it possible to automate a process like e. g. uploading a picture/document to a webpage? I'm thinking of the upload process of uploading a product to amazon. Is that possible?
Thank you for your effort and keep up your great videos :D
Refer below video:
ua-cam.com/video/7a8IofqBNo4/v-deo.html
thank you very much, sir
I have a question
is there any way to open chrome with my old data, because this method opens a new tab looks like an incognito tab with no data or cookies
Below tutorial explains how an existing internet explorer window can be automated. For chrome and selenium it will open a new window.
ua-cam.com/video/qsU_9KVaYOU/v-deo.html
Thanks for this informative video. It's really helpful...........Can you tell me the code for entering more number Data and at last how to click of Sign Up button please.
obj.findElementByID("id of the element").click
Wonderful video, you made it simple and clear!!
Can you help me how to select the element of combo box ? And readystate of the page
Thanks. Try below code:
obj.FindElementByID("ID of the element").AsSelect.SelectByText("option to be selected")
Thank you i worked !
I have encountered a new problem , i can able to code and click the icons , button, box in a upper page but I'm not able to code and click button or anything in the bottom of the page . I used various function like id , xpath , name but it shows error
Cant comment without seeing the webpage.
Thank you , pls help me on below 2 request
1) Can you tell me how to find the of current content and switch to current .
2) Code to switch of below html .
obj.SwitchToFrame ("7e99679073310ee75675cfa9b04e7cac")
Make sure you switch back to default frame once your operations on the frame are completed.
obj.SwitchToDefaultContent
Followed your directions and it works wonderfully... almost. The website opens, the data is entered into every field. However, as soon as the last field is filled and the SUB ends, the website window closes. We need the window to stay open so we can add a few entries manually. How do we prevent the window from closing before we want to close it?
Declare webdriver object outside of sub. Example given below:
Dim obj as New WebDriver
Sub testAuto()
'your code
End Sub
Thank you for your teaching!! But i have a question, how i can entry different data (for example name) each time i completed one without start from the beggining?
refer below tutorial:
ua-cam.com/video/docnLSdj8rI/v-deo.html
Hello, Thank you very much as this is to the point tutorial. Please help me with mentioned query"How to click on the any button, let say i have put up user and pass and want to click on log in"
replace .sendkeys with .click()
Is there a way to set a time for condition statement execution?
Here eg: I need to submit my form on every 3 minutes automatically?
I think we can use wait function
Great
HeyBuddy Great Video..Can you tell me where i can get the documentation for the selinium Type Library..Pls!
just read about selenium automatioon on web
Hi thanks for this highly useful video. Can you please advise how to refer to an already open instance of chrome?
Thanks. Refering to already opened browser is not possibe.
www.google.com/search?q=vba+get+handle+of+external+window
Great video. Please tell how to automate a selection from drop down on chrome
its explained in the tutorial
Hi Sir, Thanks a lot for this wonderful video. I can able to open the chrome browser, however it is getting closed after the execution of code. Why it is happening and can we control the website which is already opened in chrome using excel vba?
Accessing already opened window is not possible. It closes only after the last line of the code get executed. It wont close until there are lines of code yet to be executed. If you do not want the browser to close, put a message box as given below. It wont close until you click on the message box.
MsgBox "Wait"
@@AutomationMadeEasy Hi Sir, Thanks for your comments.
It was an awesome tutorial, the way you explained is pretty much very good.
Need few clarifications on this pls. It would be a great help.
How to submit the values?
And how to repeat the entry from the multiple rows.?
Like I have a form, and I have a records of 100+, how do I submit these one by one. By one macro running.
Thanks a ton brother.
For submitting values use .click
For looping syntax refer looping syntax:
ua-cam.com/video/docnLSdj8rI/v-deo.html
Hi and thanks for your videos.
Previously I was using your video related to Internet Explorer. Now willing to shift to Chrome and or Edge, I understand that I need selenium. However, it seems that the provided link to download Selenium s no more valid (at leat I cannot find it...). Does Selenium extension might suffice?
Thanks in advance for your valuable advices
link for seleniumbasic is still operational. Driver link has changed for which please refer my tutorial "From where do I download chrome driver for Chrome 115 and above"
Dear@@AutomationMadeEasy, you're definitely correct. I have followed more precisely the process and all works perfectly. Just need to practice more!! Thanks for you incredible work.
I am still learning (I'm in high school...) and thank you for the work, it's so valuable!!!. If I may, I would request you an application that would be appreciated by many: whatsapp message sent by excel with a customized image / dynamic photo (based on an excel table) with data changing depending on the person supposed to receive the message. Keep going your job is awesome and for those like learning it is really a treasure!
Is the software safe to use in term of data privacy or data breach?
Is it possible for selenium vba to use the currently open browser/webpage in it's automation instead of opening another chrome?
nopes
Hi there,
Excellent tutorial.
My issue is , chrome is not opening my currently logged in user.
I have to fill form after logging in into Eway bill site. It's working perfectly with IE .
this approach will always open a new browser session.
Very nice, I love technical! Can this Excel workbook be turned into (compiled??) an executable file (.exe)? If so, how?
Well we can create button on it and take control of the execution from the button. Below tutorial demonstrates the same:
ua-cam.com/video/docnLSdj8rI/v-deo.html
If I have Google Chrome Version 81.0.4044.92 (Official Build) (64-bit) but I have to use Chrome Driver 2.21 for Selenium then does it mean that this will also be the default when I used Chrome without the script. Like just browsing and other stuff.
In the tutorial it is explained how to update the chrome driver. Chrome dtiver 2.21 will not work with chrome browser 81
How to upload photo file in chrome browser and help me with the shell script sir.
In this tutorial every named website field is "key stroked" in with SendKeys. What if I need to use a particular cell in the spreadsheet to fill in a website field? I created string variables to store all the cells of interest, but I do not know how to call the variable with Sendkeys. I tried obj.FindElementByName("fieldname").value VariableName but this does not work.
obj.FindElementByName("fieldname").sendKeys(variableName)
Thanx for your video,please tell,how to target currently open browswer tab,without opening site from code
Below tutorial explains how an existing internet explorer window can be
automated. For chrome and selenium it will open a new window.
ua-cam.com/video/qsU_9KVaYOU/v-deo.html
Super everthing working as you thought, one small quiry which is taking lots of time to fix
what is the code while using chrome to click on login button.. when i see the inspection saw this..
Case1
==$0
"Continue"
case2
"Continue" ==$0
please share url of the page
@@AutomationMadeEasy
kite.zerodha.com/
Hi - thank you for sharing the video
I tried to run your example and I got an error -
" compile error sub or function not defined "
can you help
did you select Selenium Type library from references?
Thank you for the information sir..
Sir i need information about how to auto fill HTML online form with excel data... without knowing to the web page admin that it was auto filled... it must show as the form manually entered.. please help me how to do it..
Can u show how to clear cache memory from crome browser using vba
How you will click a button ? i tried ".Click" by getting element id but not working on Smule.com
congratulation for the job! Just a question, how can I use the mouse Right-Click?
obj.FindElementById("id of the web element").ClickContext
@@AutomationMadeEasy thank you!
Hi your videos are very useful. Please let me know if there is an option to run this on mac? If yes how can I download mentioned Selenium Wrapper and Selenium Basic in mac.
unfortunately mac is not supported.
I want the code line for stop some time in seconds for entering the captcha before Click button?
Put a message box. Msgbox "Wait". Enter your captcha then click ok on the message box
I tried to use:
Do While Obj.busy
Application.Wait DateAdd("s", 1, Now)
Loop
from another video you posted, to an excel vba but I get an error: Object doesn't support this property or method, what I need to change? What I need is the macro to wait until a form gets downloaded from the web before closing everything. Thanks.
Need to see the web page to handle this
IS there a way to access this while the webpage is already up? I want to be able to do this with contact information for different people, but I can't keep reopening my browser every time I do it.
Thoughts?
It will open a new browser every time you start fresh but once you are in the system you can navigate back and forth to any page. I will need to see you pages to suggest robust solution for your requirement.
Hi
How can we perform search operation using class name and after put result in search bar how can we perform enter opertion.
Hi there, thank you for the very informative video. I've had some success using your script, but i have an issue with a web page that requires login with Microsoft account credentials. Not able to go past the password field window.
(.Click) works for the "Next" button on the Email field window, but not for the "Sign in" button on the password window which comes after.
Any help would be much appreciated.
will need to see the html of the web page to suggest a solution.
Thanks for the reply. Sure, how can I send that to you?
Refer 'About' section of the channel for contact details
This is really useful stuff! Thanks for the sharing. Would you mind helping me on the following?
1. Is there a way to command the script to start only after I click a link (could be any link)?
2. How to command the script to click on certain buttons on the page?
Thanks.
Your welcome. Below are answers to your question;
1. The script will always launch a new browser instance. So clicking of any link shall be included as part of the script.
2. yes you can click any button on thee page. If you can share the url of your page I would be able to guide you.
Lindy - Regarding #1, there probably is a way to do this. I've done something similar using the IE and HTML object models in Excel. They key is to use Events. The Selenium object model needs to have Events defined, however. Think Access forms or Excel objects. An Access form may have an "OnLoad" event, which triggers when the form loads. An Excel command button may have a "Click" event, which triggers when clicked. Likewise, elements on a webform have the same, BUT the object model for those events needs to be translated in the Selenium model.
Back in the day when IE was still usable, you could instantiate an object from the HTML DOM and bind it to an element on the page, say a hyperlink. Then use the click event of your new object to trigger whatever script you want. If I remember right, you probably would need to define a class module to wrap all of this. For fun, I remember making a simple Excel macro that would open or bind to an existing IE instance on Google, then whenever the "search" button was clicked, the macro would look at what was in the search box and pop up a message box saying "You're searching for xyz". The key was that I needed to define a new class, bind a procedure to the click event, then set an instance of that class as the button on the page, probably by mapping its HTML path. This method was particularly useful, because we had a tool that opened FedEx and entered shipping data, but stopped for user input. It was important to allow the user to click a button, and have the program "know" that the button was clicked, rather than just waiting around.
If the Selenium model includes events, you theoretically can do the same. If you load the Selenium reference into a VBA project and use the Object Browser, you may be able to see if events are defined (if the DLL and assemblies were built correctly, anyway). But I wasn't able to find documentation online for the Selenium object model :(
@@TheNooberd thank you. this is alot of unpack, let me try to find out more :)
While running this programme how to clear some fields in the form which are filled already by default and enter our new data from excel.
obj.FindElementById("id f the elementt").clear
How to fill birthday and gender using same program kindly add that part also as these are dynamic fields.. kindly tell please
Chrome has the latest version 116.0.5845.140 and I can't find its selenium for it
I have implemented the same steps and it gives an error when obj.start chrome do you find a solution
refer below tutorial:
ua-cam.com/video/KqWUC-xWYpA/v-deo.html
Excellent tutorial! How do I press/hit ENTER using this Chromedriver? Tried everything sendkeys, keys.enter, etc, nothing worked
Application.SendKeys "{ENTER}"
Thank you, this was really a great help. One problem I have is that after opening the website and signing in the website closes immediately? Do you have any suggestions how I might overcome this problem.
I need to have a look at your code to suggest a solution
@@AutomationMadeEasy Hi Thanks for following up, here is the code:
Public Sub Commsec_Refresh()
Dim obj As New WebDriver
On Error GoTo Err_Clear
obj.Start "Chrome", ""
obj.Get "www.commsec.com.au/"
obj.FindElementById("txt-clientId").SendKeys ("666666")
obj.FindElementById("password-field").SendKeys ("666666")
obj.FindElementById("btn-login").Click
obj.FindElementByPartialLinkText("View Watchlist").Click
Exit Sub
Err_Clear:
If Err 0 Then
Err.Clear
Resume Next
End If
End Sub
Thanks
Exit Sub may be causing the browser to close.
@@AutomationMadeEasy I tried that but it doesn't make any difference. I even tried opening Google only but with the same result. Any other ideas?
By default the browser will close after last line of execution. Thais the default behavior.
I'm trying to run through the steps, and Chrome does open up, but displays the following text: "Chrome is being controlled by automated test software" - and then immediately closes.
Is there any way to fix this? Ive searched online but can only find java codes etc. anything you could please suggest to write into the VBA code to be able to run this? Thanks!
Thats the default behaviour browsr will close after the last line of code. What ever coe you will write that would get executed and then it will close the browser. If you want to avoid that put a message box.
Messagebox "Wait" . It will wait until you click on the message box.
How can we add if else condition in this coding. Example if i get duplicate match click “yes” if “no” then i want to bypass this and go to next step.
syntax of if statement can be found in below tutorial:
ua-cam.com/video/T6HRjiAdW38/v-deo.html
Thanks for the class it was very helpfull.
I have a query please help me to solve it.
I have wrote the code to auto fill details on websites once it done that web sites navigating to next page then getting error, I have to fill some more details over the next page. How can I do that?? please help me here.
share your code and url of the web page
Thank you so much for the video. However, I was stuck at the line obj.Start "chrome", "" . It says "Automation error". Any clue?
Dot net 3.5 is missing.Follow below steps
Close all excel workbooks.
Click Start button on your windows desktop
Search for Features
Select Turn Featurs on or off
On the new window select the first option dot net 3.5
Click ok
Dot net 3.5 will get downloaded and installed in few minutes.
Now open your macro and execute
For filling in the drop down boxes how does that work? it doesnt seem to be the same as IE where you can do obj.findelementbyId("month").Value = 4
how do we do this on chrome? am i missing a step
obj.findelementbyId("month").sendKeys("April")
@@AutomationMadeEasy thank you!
Sir, u are great... but some part is confused me can i contact with you to learn some steps...
refer about section of the channel or share ur contact details
@@AutomationMadeEasy sir jio no 7001432347