{"id":811,"date":"2020-11-05T17:56:19","date_gmt":"2020-11-05T17:56:19","guid":{"rendered":"http:\/\/99excel.com\/home\/?p=811"},"modified":"2021-05-14T16:07:53","modified_gmt":"2021-05-14T16:07:53","slug":"selenium-vba-chrome-automation","status":"publish","type":"post","link":"https:\/\/99excel.com\/home\/selenium-vba-chrome-automation\/","title":{"rendered":"selenium vba chrome automation"},"content":{"rendered":"\n<p>In below video, I have teach you how to automate Google Chrome from Excel VBA. As you know, we can do automation using VBA in Excel. But we can\u2019t automate Chrome browser from VBA without third party library. <\/p>\n\n\n\n<p>I have refer selenium library to automate chrome. Selenium is one of the most popular automation tool for testing and Web Scraping. It is completely Free and easy to use in VBA projects. <\/p>\n\n\n\n<p>In this tutorial, I have use selenium Basic to open Chrome and will open multiple tabs so you can work on multiple websites at the same time. I have share you my VBA code as: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Sub Multitab()\r\nDim Chrome As WebDriver\r\nSet Chrome = New ChromeDriver\r\nConst URL = \"https:\/\/google.com\/\"\r\n\r\nWith Chrome\r\n    .Start \"Chrome\"\r\n    .Window.Maximize\r\n    .Get URL\r\n    .Wait 500\r\n    .ExecuteScript \"window.open('https:\/\/web.whatsapp.com\/','_blank');\"\r\n    .Wait 500\r\n    .ExecuteScript \"window.open('https:\/\/www.facebook.com\/','_blank');\"\r\n    .Wait 500\r\n    .ExecuteScript \"window.open('https:\/\/www.instagram.com\/','_blank');\"\r\n    .Wait 500\r\n    .ExecuteScript \"window.open('https:\/\/www.linkedin.com','_blank');\"\r\n    .Wait 500\r\n    .ExecuteScript \"window.open('https:\/\/99excel.com\/','_blank');\"\r\n    .Wait 500\r\n    \r\n    .SwitchToPreviousWindow\r\n    .Wait 500\r\nEnd With\r\nMsgBox \"Done\"\r\nEnd Sub<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-rich is-provider-embed-handler wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Open Multiple Tabs in Chrome |  Selenium Automation |  Excel VBA Code Webdriver  |  99Excel.Com\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/QxzBZz9dEyQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In below video, I have teach you how to automate Google Chrome from Excel VBA. As you know, we can do automation using VBA in Excel. But we can\u2019t automate Chrome browser from VBA without third party library. I have refer selenium library to automate chrome. Selenium is one of the most popular automation tool &#8230; <a title=\"selenium vba chrome automation\" class=\"read-more\" href=\"https:\/\/99excel.com\/home\/selenium-vba-chrome-automation\/\" aria-label=\"More on selenium vba chrome automation\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-811","post","type-post","status-publish","format-standard","hentry"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/posts\/811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/comments?post=811"}],"version-history":[{"count":1,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/posts\/811\/revisions"}],"predecessor-version":[{"id":813,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/posts\/811\/revisions\/813"}],"wp:attachment":[{"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/media?parent=811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/categories?post=811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/tags?post=811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}