How to get data from a website that can only be viewed in chrome - excel

I'm trying to automate a way to pull data from a website but that website only allows me to view in chrome, firefox, safari, or opera.
I added the url into excel to power query but I'm not able to get the data I'm looking for as I get this error message below.
Any suggestions or recommendations are highly appreciated.
web address wont work with ie

You can use Selenium Basic. It will require the end user to have that framework installed, but works like a charm when Internet Explorer and MSXML aren't an option (if MSXML works, that would be preferable as it is the fastest way to retrieve data - you can find examples and explanations here as recommended by QHarr).
Note: you'll also have to update the driver that originally comes with the framework installation (you can get the latest driver for chrome here and the file to be replaced can be found in the root folder of Selenium Basic's installation C:\Users\%UserProfile%\AppData\Local\SeleniumBasic).
You'll have to select the appropriate reference within the VBA IDE: "Selenium Type Driver" and then the code goes like this:
Public Sub SeleniumImplementation()
Dim driver As New Selenium.WebDriver ' in older versions was SeleniumWrapper.WebDriver
'Late binding would be:
'Dim driver As Object
'Set driver = CreateObject("Selenium.WebDriver")
driver.start "chrome", "http://news.yahoo.com"
driver.open "/politics"
driver.stop
End Sub
You should be able to get the rest of the syntax from the autocomplete and object browser and you can take a look at more code examples here.
If Chrome is too slow, you can try PhantomJS which comes with Selenium's installation.
(Note: the code is untested.)

If you've already tried on internet explorer and it didn't work I would suggest trying the following function
dim ie as internetexplorermedium
It helps if you have securities on internet explorer. It will make your life much easier if you can use that instead.

Related

Get already opened Edge (not IE) browser window(s) and scrape contents

I used to be able to find all open IE windows via VBA and was able to access one of the already-opened page's contents in Excel with the objShell object mechanism. I didn't--and don't need--direct "control" (automation) of the browser in terms of pushing buttons, opening urls, etc.
I know automation of Edge is not possible just using VBA, but is there any ability to simply 1.) get a list of MS EDGE open windows and 2.) retrieve the elements within a given (already opened) window without resorting to downloading drivers and utilities like Selenium?
As Tim Williams had informed you there is no COM interface available for the Edge browser.
Microsoft has not provided any way to automate the Edge browser using VBA automation.
So, there is no way to fetch the already opened instance of the Edge browser and retrieve elements with the help of VBA.
I suggest you use the officially recommended way Selenium Web Driver to automate the Edge browser.
I have seen that you want to avoid the Selenium Web Driver approach but at present, this is the only way available to automate the Edge browser.
If you are having any issues with the Selenium Web Driver approach then you can inform us about it. We can try to provide suggestions for it.
Thanks for your understanding.
Please note: I'm the author of this software
You can connect to active instances of Edge with IE mode using Internet Controls for Edge: https://pomio.dk/internet-controls-for-edge/.
Internet Controls for Edge is a COM component and it exposes the same APIs as Microsoft Internet Controls (for Internet Explorer), so if you've already created some automations of Internet Explorer (using Microsoft Internet Controls), then it should be straight forward to move to Internet Controls for Edge.

Upgrading From IE to EDGE

I need VBA Code translation for Edge.
I’m in a Window10/Excel 16 environment. I have been using Internet Explorer (IE) when I scrape data from websites.
Now, I am needing to upgrade to Microsoft Edge. I am having to translate some code and I am finding I need some help.
I used to call the URL https://www.azblue.com/individualsandfamilies/ using “IE.navigate”. Ex:
IE.navigate "https://www.azblue.com/individualsandfamilies/"
But, what I cannot figure out is how to use these other lines of Code with Edge. Here are a 3 lines of code (disjointed) that I use often and need to know the syntax translation for Edge:
IE.document.getElementById("lockedcontent_0_maincolumn_2_twocolumn2fb4d204091d44aa08196ef423877fd9f_0_ToolbarUsernameControl").Focus
IE.document.getElementById("lockedcontent_0_maincolumn_2_twocolumn2fb4d204091d44aa08196ef423877fd9f_0_ToolbarUsernameControl").Value = "MyUserName"
IE.document.Focus
Of course, any help is greatly appreciated
Thanks!
Microsoft Edge browser doesn't support the COM automation interface that used in VBA. If you want to automate Microsoft Edge, you should use WebDriver.
To get started using WebDriver, you will need to download a testing framework of your choice along with an appropriate language binding and the MicrosoftWebDriver server.
We usually use Selenium and you could download the language binding in this page. At the same time, you could download Microsof Edge WebDriver in this page.
Reference link: Will Microsoft Edge support COM automation (InternetExplorer object)?

Python - Using a browser other than Chrome with webbot package

I am new to programming and my first task, which should be really simple, is to automate a proccess, where I log in in a website with my credentials, I click on some buttons and that is it. I am using Python 3.6 on windows 10.
I am trying to do it using the webbot module, which so far has come really handy but I have one big problem.
The standard browser for webbot is Google Chrome and thus the site always opens with Chrome. I need to open the site with Internet Explorer.
I have set IE as default browser, but nothing changed, Chrome would still open.
I deleted Chrome, but then when I would run the programm nothing would happen.
I checked the init.py file and the drivers folder of the module and I think that this module can only work with chrome.
Is it possible to use IE or does this mean that this package does not support this browser at all?
Which alternatives would you suggest?
Edit: If I am not mistaken Selenium does not support IE11 on windows 10, so that is not an option, unless I am mistaken.
Thanks in advance
There is no support for another browser other than Chrome (as far as the webbot module is concerned).

Is the same htm source edit extension available on windows?

I'm looking for the chrome extension that allows you to edit html source and instantly view the result. See the screenshot for mac, perhaps there is no such software available for windows version of chrome, but I would appreciate the mac version reference too.
There is already this kind of tool built in to Chrome. If you right click on HTML page and select "Inspect Element" you can make your changes and Chrome will update itself automaticly.
If you don't like this feature however and want one that looks beter, check out this link. I'm almost certain there will be some results that you like.
https://chrome.google.com/webstore/search-apps/Editor
I'm terribly sorry, this is NOT a chrome plugin, but node.js application https://github.com/phuu and this is really good one see the screen

Sharepoint - Accessing PDF links via Chrome

Firstly let me state that I have zero experience with Sharepoint so this may be a pretty stupid question.
I started a new job yesterday and part of the induction is viewing the company literature via their Sharepoint portal. I've noticed that whenever I try to access an embedded PDF link via Chrome it seems like it's a broken link and appears to do a Google search instead. Yet when I try the exact same steps using IE all works as expected.
I don't want to raise this with my boss if it's going to make me look a little stupid! Is there some cross browser issue with PDF links?
Thanks.
Darren, try flushing the cache in Chrome, and if necessary, log off and log back into your computer. We've had the same problem with Chrome and Google doesn't seem to be fixing the problem (although they might point the finger back at Microsoft).
Yes I have the same issue with Chrome and Firefox
Sharepoint is optimized for IE and vice versa
You also can't open Files with the "Check in and Check out" functionality because only IE is able to do that from Sharepoint (Other Browsers will just Download the File)
You can try using AddOns like IE-Tab
(simply uses the IE algorithms within FF and Chrome for specific Sites)
But its better to use Sharepoint with IE

Resources