Welcome Guest Search | Active Topics | Sign In | Register

Access a control within an Iframe Options
Marcelo Santana
Posted: Tuesday, October 10, 2017 9:17:48 PM
Rank: Newbie
Groups: Member

Joined: 10/10/2017
Posts: 2
I am doing some tests before the purchase to know if this library will be usual I like very much

I could not do it simply is to get a control that I could already get in a conventional webcontrol

Dim link As HtmlElement = nav.Document.Window.Frames (0) .Frames (0) .Document.Forms (0) .Document.GetElementsByTagName ("a") Item

Iframes are in the same domain

it is possible?

Thank you
eo_support
Posted: Wednesday, October 11, 2017 7:59:21 AM
Rank: Administration
Groups: Administration

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

You will need to modify your code to use WebView.EvalScript in order to use EO.WebBrowser to achieve the same thing. See here for more details:

https://www.essentialobjects.com/doc/webbrowser/advanced/jsdom.aspx

Please let us know if you still have any questions.

Thanks!
Marcelo Santana
Posted: Wednesday, October 11, 2017 8:36:07 AM
Rank: Newbie
Groups: Member

Joined: 10/10/2017
Posts: 2
WebView1.EvalScript("document.getElementById('Button1').click();");

Ok I already checked this code does not work when the control or function is inside an iframe
Even releasing the options

options.EnableXSSAuditor = false;
options.EnableWebSecurity = false;
options.AllowJavaScript = true;
options.AllowJavaScriptAccessClipboard = true;
options.AllowPlugins = true;
options.AllowJavaScriptDOMPaste = true;
options.AllowJavaScriptOpenWindow = true;
EO.WebBrowser.Runtime.RemoteDebugPort = 1234;
EO.WebBrowser.Runtime.SetDefaultBrowserOptions (options);
webrowser1.SetOptions (options); options.EnableXSSAuditor = false;


Thanks for your response
eo_support
Posted: Wednesday, October 11, 2017 10:18:32 AM
Rank: Administration
Groups: Administration

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

EnableWebSecurity is the correct setting to turn cross site scripting policy off. However you need to set it before the WebView is created. If you look at the TabbedBrowser sample application source code, you can add code like this:

Code: C#
EO.WebEngine.Engine.Default.Options.SetDefaultBrowserOptions(your_options);


Inside App.xaml.cs/App.xaml.vb before the MainWindow is created.

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.