How to Automate Data Entry on Chrome Browser using excel macros

Share
Embed
  • Published on Jan 8, 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

Comments • 148

  • Rilder Alejandro Mejia Sanchez

    Hello, I'm using the macro, it opens a new browser, enters the data but it closes by itself immediately, how can I avoid it closing?

    • Automation Made Easy
      Automation Made Easy  Minute ago

      it will close the browser by default before terminating execution. To avoid closing of browser you may include below line of code:

      MsgBox "Done"
      the browser will not close until you click 'ok' on the message box

  • Sidharth Pattanayak
    Sidharth Pattanayak 4 hours ago

    How we use for each loop of webelements inside a page on chrome browser using excel macro. Give an example of this.

  • Golden Virus
    Golden Virus 5 days ago

    How to click button.
    Please show me

  • Alejandro Pérez
    Alejandro Pérez 6 days ago

    Excelente explicación, lo que me enseñaste hoy, me será de gran utilidad.
    Congratulations for a good job!

  • Shady Banyata
    Shady Banyata 18 days ago

    Can you automate the system to change its IP Address from excel sheet?

  • Babasaheb Murude
    Babasaheb Murude 20 days ago

    Very good information

  • Subhadeep Sannyasi
    Subhadeep Sannyasi 26 days ago

    You are a very good teacher. Thanks

  • MYPE
    MYPE Month ago

    great video

  • Kavitha A
    Kavitha A Month ago

    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.

  • Edwin Xiao
    Edwin Xiao Month ago

    Hi, how can I get more advice from you? Do you have a linkedin account, or email I can use?

    • Edwin Xiao
      Edwin Xiao Month ago

      @Automation Made Easy Thanks, I sent an email.
      I would also like to ask if there is a way to get a handle in VBA on a Chrome or Firefox browser that is already open, and then will in a form in that broswer.

    • Automation Made Easy
      Automation Made Easy  Month ago

      you can get the details from the 'About' section of this channel

    • Automation Made Easy
      Automation Made Easy  Month ago

      share your contact information. I will get in touch

  • Venkata Vamsi
    Venkata Vamsi Month ago

    Good Explanation Bro, But there is disturbance in voice. Try to improve that. Thanks

  • Yohana Agustin
    Yohana Agustin Month ago

    Sir, I got the same problem with @Pardeep Kumar. need your help. Thanks

    • Automation Made Easy
      Automation Made Easy  Month ago

      The browser will close after last line of execution. To prevent it from closing just before the last line write:
      MsgBox "Any Message".The execution will not end until you click 'ok' on the message box and browser will remain open until you click on the message box.

  • Pardeep Kumar
    Pardeep Kumar Month ago

    Sir, First of all thanks to you for such Video.
    I stuck in one thing. Whenever I run that script, after execution chrome automatically closed. How to avoid such this. I want chrome should be opened so that I can check more details in it

    • Pardeep Kumar
      Pardeep Kumar Month ago

      @Automation Made Easy thanks Sir for ur quick reply

    • Automation Made Easy
      Automation Made Easy  Month ago

      The browser will close after last line of execution. To prevent it from closing just before the last line write:
      MsgBox "Any Message".
      The execution will not end until you click 'ok' on the message box and browser will remain open until you click on the message box.

  • Manikandan Pandian
    Manikandan Pandian Month ago

    Hi Bro, Im getting below error. Can you able to fix the issue?
    "The source was not found but some or all event logs could not be searched. inaccessible logs"

    • Manikandan Pandian
      Manikandan Pandian Month ago

      @Automation Made Easy While accessing the below code , i'm getting the error.
      obj.Start "chrome", ""

      Error: "The source was not found but some or all event logs could not be searched. inaccessible logs"
      My Chrome Version is Version 72.0.3626.121
      Chromedriver version is 2.46.

    • Automation Made Easy
      Automation Made Easy  Month ago

      At what point are you getting the error

  • Dave Versatile
    Dave Versatile Month ago

    Very clear tutorial. Thank you.

  • kerala india
    kerala india Month ago

    I

  • disti fisto
    disti fisto Month ago

    very educational video

  • ram narain tiwari
    ram narain tiwari 2 months ago

    I want some data automation please help me sir please

  • ram narain tiwari
    ram narain tiwari 2 months ago

    Sir how to automate Excel sheet on live market data please make a video sir how can I contact u

  • pragnesh parmar
    pragnesh parmar 2 months ago

    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"

  • John
    John 2 months ago

    Bro many tonnes thanks to you, your video was light to my path feeling blessed

  • Philip Cassidy
    Philip Cassidy 2 months ago

    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.

    • Gabriel Toledo De La Vega
      Gabriel Toledo De La Vega Month ago

      @Philip Cassidy Very good! I had the same problem and was able to get the solution here.

      Thank you very much;

    • Philip Cassidy
      Philip Cassidy 2 months ago

      I managed to find the answer at stackoverflow.com/questions/33857246/selenium-vba-exit-sub-without-close-browser-window. You must declare a global variable for the driver and then the browser stays open. Thanks for you help though.

    • Automation Made Easy
      Automation Made Easy  2 months ago

      By default the browser will close after last line of execution. Thais the default behavior.

    • Philip Cassidy
      Philip Cassidy 2 months ago

      @Automation Made Easy I tried that but it doesn't make any difference. I even tried opening Google only but with the same result. Any other ideas?

    • Automation Made Easy
      Automation Made Easy  2 months ago

      Exit Sub may be causing the browser to close.

  • Lindy Graham
    Lindy Graham 2 months ago

    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.

    • Automation Made Easy
      Automation Made Easy  2 months ago +1

      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.

  • tefelohin
    tefelohin 2 months ago

    works like a charm

  • Madan Raj
    Madan Raj 3 months ago

    How to make selenium library option in reference available as it is not available in my VBA

  • Eric Flaherty
    Eric Flaherty 3 months ago

    So I get as far as auto populating the form fields. Specifically a login that is required as a step to get to my form. The login takes about 3 seconds to load after the chrome screen starts. Is there a wait command that will work to give it time prior to entering the text into the login fields?

    • Eric Flaherty
      Eric Flaherty 3 months ago

      Automation Made Easy any further thoughts on this?

    • Automation Made Easy
      Automation Made Easy  3 months ago

      thats not possible. Automation will always open up a new browser session

    • Automation Made Easy
      Automation Made Easy  3 months ago

      i emailed you

    • Eric Flaherty
      Eric Flaherty 3 months ago

      Automation Made Easy also I was thinking is there a way to code it to bring to front an already open chrome window if I have the form already up?

    • Eric Flaherty
      Eric Flaherty 3 months ago

      Automation Made Easy eric_f1979@yahoo.com

  • janu selvakumar
    janu selvakumar 3 months ago +1

    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

    • janu selvakumar
      janu selvakumar 3 months ago

      I noticed it that whenever I refresh the page the id getting change , that's why am not able to switch . Please tell how to switch using x path

    • janu selvakumar
      janu selvakumar 3 months ago

      Its a client site i may not able to share it..
      Can we use webelement to switch ? How to use xpath element to switch.. Also i found one of the frame have name but part of numbers changing whenever i referesh , ex cd-fname-76776, only the numbers getting change

    • Automation Made Easy
      Automation Made Easy  3 months ago

      i need to see the web page

    • janu selvakumar
      janu selvakumar 3 months ago

      I'm not able to switch frame using that code , even i switched to defaultcontent. But it showing no element error .
      Below is the another html code that i wanted to switch frame its doesn't have id nor name wt to do ?

    • Automation Made Easy
      Automation Made Easy  3 months ago

      obj.SwitchToFrame ("7e99679073310ee75675cfa9b04e7cac")
      Make sure you switch back to default frame once your operations on the frame are completed.
      obj.SwitchToDefaultContent

  • Harish Ramakrishnan
    Harish Ramakrishnan 3 months ago

    Can you tell me how to click the grid cell using the code , ex I have a web application which has many grid cell and I have click it to open the page.

    • Harish Ramakrishnan
      Harish Ramakrishnan 3 months ago

      @Automation Made Easy thanks !
      Can we able to change the text inside the xpath ? When I click the search it will show different names , so I wanted to click element by xpath text since I have the name list..
      Eg, bot. Find element by xpath("//*[text()='name']").click
      I want to input value frm excel in 'name'

    • Automation Made Easy
      Automation Made Easy  3 months ago

      you will have to wait until an element on the webpage entirely comes up. You can use the below code snippet.
      cnt=obj.findElementsByXpath("xpath of some element").count

      while (cnt < 1)
      cnt=obj.findElementsByXpath("xpath of some element").count
      wend

      Be careful you do not land into infinite while loop.

    • Harish Ramakrishnan
      Harish Ramakrishnan 3 months ago +1

      Pls help How to Code to readystate of the webpage ?

    • Automation Made Easy
      Automation Made Easy  3 months ago

      use below xpath:
      //*[@placeholder='Search by customer name, order, phone or PO number']

    • Harish Ramakrishnan
      Harish Ramakrishnan 3 months ago

      @Automation Made Easy thank you so much its working !
      Have one more doubt , in the below element i couldn't find id , Name , nor xpath .. wt to do in such case


      When I copy the xpath its show the below , however when run the code using that xpath it throws an error .
      Xpath:
      /html/body/app/mat-sidenav-container/mat-sidenav-content/div/main-app/main/landing/div[1]/div/div[1]/thd-card/div/search-bar/div/div/input

  • Sidharth Pattanayak
    Sidharth Pattanayak 4 months ago +1

    Sir please upload more videos of Selenium -Vba-Chrome

    • ou812927
      ou812927 3 months ago

      Agree, need to see more, like clicking Submit buttons, checking radio buttons and so on

  • Sidharth Pattanayak
    Sidharth Pattanayak 4 months ago

    what is the syntax for entering data here

  • Pradeep Kumar
    Pradeep Kumar 4 months ago

    Hi I had seen your Video on configuring the Drop down menu through VBA on IE. I did watch your Video on How to Configure the text box but didn't find the piece on how to configure on Drop down menu using Chrome Browser. Can you please help? I did saw on one of the users commented on your Video and you posted couple of lines on Birthday entry Syntax. I tried but didnt work.

    • Automation Made Easy
      Automation Made Easy  4 months ago

      send me snapshot of the webpage on automationandagile@gmail.com

    • Pradeep Kumar
      Pradeep Kumar 4 months ago

      @Automation Made Easy : Thanks. But I didnt understand the Syntax. Can you please correct me.

      objFindElementByXpath ("//abc.com/bom/[@text='exportBom']"

    • Automation Made Easy
      Automation Made Easy  4 months ago

      objFindElementByXpath("//*[@text='Export']")
      I am assuming text on the button is 'Export'.

    • Pradeep Kumar
      Pradeep Kumar 4 months ago

      @Automation Made Easy : I did figure out how to configure that using your hint below thanks a lot. But I am stuck on one particular case.
      I have Web page where I key in some data and search ,then it has a click button to "Export to Excel" . When I click manually on the click button the entire Web page gets downloaded as single xls file. But when I try to automate that using Macro I found that was not possible because it doesn't have an Id. The options what is available in HTML scripts are
      1. Input type "Button"
      2. Name Value "Export to Excel"
      3. onclick "export();
      4. class "button"

      I tried using obj.FindElementByClass("button").Click. This is a common name for even for the update click button. So didn't export to excel.
      Any other way I can actually export the complete web page to excel?

    • Automation Made Easy
      Automation Made Easy  4 months ago

      I need to see the html of your dropdown . Please paste it in the comments, I will look into it

  • Ankita Patil
    Ankita Patil 4 months ago

    Can u show how to clear cache memory from crome browser using vba

  • Dillip Kumar Sahoo
    Dillip Kumar Sahoo 5 months ago

    Looking for a option to use Chrome from within VBA and finally got the right one.

    It works for me.

    Thank you so much,

  • Wonder Video
    Wonder Video 5 months ago +1

    Sir, I want to know how do i paste from excel multiple column to web form cell by cell

  • Kaushik Vankayala
    Kaushik Vankayala 5 months ago

    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?

    • Automation Made Easy
      Automation Made Easy  5 months ago

      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.

  • 최종병기귓방맹이

    It's great content. ^^
    I have one question for you.
    Why can't I get the data from the element(input box) with the syntax below?
    Dim tmp
    tmp = obj.FindElementByName("id1").Text

    • Automation Made Easy
      Automation Made Easy  5 months ago

      Your welcome

    • 최종병기귓방맹이
      최종병기귓방맹이 5 months ago

      @Automation Made Easy Wow!! It's a good way to get the data.
      Thank you so much. May good luck and good fortune always be with you. ^^;

    • Automation Made Easy
      Automation Made Easy  5 months ago

      tmp = obj.FindElementByName("id1").Text
      Above line would work for labels not for input boxes. Try below code for input boxes.
      obj.FindElementByName("id1").attribute("value")

    • 최종병기귓방맹이
      최종병기귓방맹이 5 months ago

      @Automation Made Easy I tested it on chrome, but I can't get the text.

    • Automation Made Easy
      Automation Made Easy  5 months ago

      Can you paste the html of the inputbox. I will have a look and revert.

  • Gopinath Venkatesan
    Gopinath Venkatesan 5 months ago

    How you will click a button ? i tried ".Click" by getting element id but not working on Smule.com

  • Gioele Vucenovich
    Gioele Vucenovich 6 months ago

    Hi, what should I do to automatize also the birthday?

    • Automation Made Easy
      Automation Made Easy  6 months ago

      Your welcome.Well there isnt any documented stuff, You can email me if at easilyautomateashu@gmail.com

    • Gioele Vucenovich
      Gioele Vucenovich 6 months ago

      @Automation Made Easy thank you very much. Are there some instructions/books where I can find all these information?

    • Automation Made Easy
      Automation Made Easy  6 months ago +1

      bot.FindElementById("day").AsSelect.SelectByText ("5")
      bot.FindElementById("month").AsSelect.SelectByText ("Dec")
      bot.FindElementById("year").AsSelect.SelectByText ("1970")

  • Debiprakash Chhuria
    Debiprakash Chhuria 6 months ago

    please give a link for "Selenium"

  • Nico-kk
    Nico-kk 6 months ago

    Great video and thanks a lot for sharing, just a question, I followed all instructions but after few sec the chrome window closes automatically, do you have any tip to fix this problem? Chrome version is 72.0.3626.96 (Official Build) (64-bit)
    Could be an issue cause by 64-bit version?

    Thanks in advance, Nico

    • Nico-kk
      Nico-kk 2 months ago

      @Tenzin Lother Hi Lother, basically I added the code "Application.Wait (10000)" o similar code in order to leave the macro in execution for a XX period of time and then give other instructions, there are some way to do it, if you want I can share the code :)

    • Tenzin Lother
      Tenzin Lother 2 months ago

      @Nico-kk because i am facing same issue which you face but i didn't understand what you did

    • Tenzin Lother
      Tenzin Lother 2 months ago

      @Nico-kk hi how you use this tip

    • Automation Made Easy
      Automation Made Easy  6 months ago

      Your welcome.

    • Nico-kk
      Nico-kk 6 months ago

      ​@Automation Made Easy thanks for the quick reply, yes I used "obj.FindElementByName("q").SendKeys ("test")
      " just as test on www.google.it, I needed to keep opened the chrome page and adding this "Application.Wait (10000)"" seems work fine, I don't know if there are other ways to get the same result but work fine so far. Thanks again for your support.

  • Kevin Tri
    Kevin Tri 6 months ago

    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.

    • Kevin Tri
      Kevin Tri 6 months ago

      @Automation Made Easy Thank you so much for your tip! I will try it!

    • Automation Made Easy
      Automation Made Easy  6 months ago

      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.

  • Shantanu Bhede
    Shantanu Bhede 6 months ago

    i am getting Run-time error -2146232567

    • Kaushik Vankayala
      Kaushik Vankayala 5 months ago

      ​@Automation Made Easy Please kindly validate below :)
      If at all the above does not work for some reason like if its a office laptop or network restricted, then you could follow the instruction in below link;
      ru-clip.net/video/gADSMbpYvXI/video.html

    • Automation Made Easy
      Automation Made Easy  6 months ago

      Some components for dot net framework are missing. You will need to install them. Try below steps:

      Go to windows start button
      Type features
      Click on Turn features on or off
      Select dot net framework 3.5
      Click ok
      Post installation restart your machine
      Execute your macro

  • Ihtesham Shah
    Ihtesham Shah 6 months ago

    How to get expand this into a submit and then loop this so you can do a long list of data entry.

  • SELVA KUMAR
    SELVA KUMAR 6 months ago +1

    obj.Start "chrome", "" error shows in this area .....run time error 438 object doesnot support this property or method.....kindly help me brother

  • Pawan Kumar
    Pawan Kumar 6 months ago

    I want the code line for stop some time in seconds for entering the captcha before Click button?

    • Automation Made Easy
      Automation Made Easy  6 months ago

      Put a message box. Msgbox "Wait". Enter your captcha then click ok on the message box

  • kamal rajan
    kamal rajan 7 months ago

    Hi,
    Thank you for the Informative video
    If the website I'm trying to enter the Data in needs a Login ID and Password to be entered twice(Dual authentication), how would I be going about it?
    Thank you in advance for your support :)

    • Automation Made Easy
      Automation Made Easy  6 months ago

      Can you share the HTML code of the dropdown list

    • kamal rajan
      kamal rajan 7 months ago

      How to choose an Option out of the Drop-down list?
      Getting an error that says Run time error '424' : Object Required

    • kamal rajan
      kamal rajan 7 months ago

      @Automation Made Easy Thank you for responding...
      The pop-up doesn't show any elements when inspected, but the code holds until the credentials are entered and Signed-In manually and proceeds ....so.....i guess that's a workaround :P

    • Automation Made Easy
      Automation Made Easy  7 months ago

      You just need to identify the elements on the popup and use the same concept.

    • kamal rajan
      kamal rajan 7 months ago

      The Username and Password Dialog Box are a Pop-up and not a part of the webpage...

  • Sidharth Pattanayak
    Sidharth Pattanayak 7 months ago

    Fantastic video Sir
    If the website is already opened then how I link this opened website by VBA macro.

    • Automation Made Easy
      Automation Made Easy  7 months ago

      IE and excel vba work on COM model using which you can interact with an open browser.

    • Sidharth Pattanayak
      Sidharth Pattanayak 7 months ago

      Then how I launch a website if CAPTCHA is present
      But in case of internet explorer opened website is handled by excel VBA macro

    • Automation Made Easy
      Automation Made Easy  7 months ago

      Thank you.
      Connecting already opened browser is not possible.