Welcome Guest Search | Active Topics | Sign In | Register

Get Web page - WebView.GetText() without UI Options
KimKamp
Posted: Friday, April 7, 2017 2:43:18 PM
Rank: Advanced Member
Groups: Member

Joined: 3/13/2017
Posts: 33
Is it possible to get a web page, and do the WebView.GetText() to read the web page, WITHOUT showing any activity to the user?

I want to find out if a particular URL has a particular string in it. I'd like to use the .GetText() function for a WebView, without the user seeing any of the activity, and not causing any change in the UI.

Is this possible? If so, would you reply with code?

Thanks!

Kim

UPDATE: It seems that the WebView will not accept a .URL and show that URL until it has received Focus. I have tried the WebView.URL without showing it in a Tab, and it does not work. Once I DO show it in a tab then it DOES work.

So... the question is: How to I use a WebView that is never visible to the user, to do the .GetText() function of the WebView page?
eo_support
Posted: Monday, April 10, 2017 9:02:41 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

You will need to create an off screen WebView through a ThreadRunner. See here for more details:

https://www.essentialobjects.com/doc/webbrowser/start/webview_no_ui.aspx

When you create a normal on screen WebView, it won't load anything until its window handle has been created (usually until you show it).

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.