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 • 89

  • Eric Flaherty
    Eric Flaherty 6 days 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 2 days ago

      Automation Made Easy any further thoughts on this?

    • Automation Made Easy
      Automation Made Easy  5 days ago

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

    • Automation Made Easy
      Automation Made Easy  5 days ago

      i emailed you

    • Eric Flaherty
      Eric Flaherty 5 days 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 5 days ago

      Automation Made Easy eric_f1979@yahoo.com

  • janu selvakumar
    janu selvakumar 21 day ago

    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 12 days 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 12 days 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  13 days ago

      i need to see the web page

    • janu selvakumar
      janu selvakumar 13 days 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  17 days 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 26 days 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 12 days 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  17 days 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 17 days ago

      Pls help How to Code to readystate of the webpage ?

    • Automation Made Easy
      Automation Made Easy  22 days ago

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

    • Harish Ramakrishnan
      Harish Ramakrishnan 22 days 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 Month ago +1

    Sir please upload more videos of Selenium -Vba-Chrome

    • ou812927
      ou812927 17 days ago

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

  • Sidharth Pattanayak

    what is the syntax for entering data here

  • Pradeep Kumar
    Pradeep Kumar Month 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  Month ago

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

    • Pradeep Kumar
      Pradeep Kumar Month 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  Month ago

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

    • Pradeep Kumar
      Pradeep Kumar Month 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  Month 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 Month ago

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

  • Dillip Kumar Sahoo
    Dillip Kumar Sahoo Month 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 2 months ago

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

  • Kaushik Vankayala
    Kaushik Vankayala 2 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  2 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  2 months ago

      Your welcome

    • 최종병기귓방맹이
      최종병기귓방맹이 2 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  2 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")

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

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

    • Automation Made Easy
      Automation Made Easy  2 months ago

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

  • Gopinath Venkatesan
    Gopinath Venkatesan 2 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 3 months ago

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

    • Automation Made Easy
      Automation Made Easy  2 months ago

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

    • Gioele Vucenovich
      Gioele Vucenovich 2 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  2 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 3 months ago

    please give a link for "Selenium"

  • Nico-kk
    Nico-kk 3 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

    • Automation Made Easy
      Automation Made Easy  3 months ago

      Your welcome.

    • Nico-kk
      Nico-kk 3 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.

    • Automation Made Easy
      Automation Made Easy  3 months ago

      The chrome browser will automatically close just before the macro ends so this is the expected behavior. Have you written any code to populate text fields/dropdowns ? If the browser closes without entering any values then it is a problem.

  • Kevin Tri
    Kevin Tri 3 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 3 months ago

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

    • Automation Made Easy
      Automation Made Easy  3 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 3 months ago

    i am getting Run-time error -2146232567

    • Kaushik Vankayala
      Kaushik Vankayala 2 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  3 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 3 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 3 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 3 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  3 months ago

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

  • kamal rajan
    kamal rajan 3 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  3 months ago

      Can you share the HTML code of the dropdown list

    • kamal rajan
      kamal rajan 3 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 3 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  3 months ago

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

    • kamal rajan
      kamal rajan 3 months ago

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

  • Sidharth Pattanayak
    Sidharth Pattanayak 4 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  4 months ago

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

    • Sidharth Pattanayak
      Sidharth Pattanayak 4 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  4 months ago

      Thank you.
      Connecting already opened browser is not possible.