Hello folks,
I'm having trouble with a few things. I'm using Visual Studio 2019, C#, Winforms.
Firstly, I read online that if I'm going to be working with iFrames, that I should set BrowserOptions like so:
Quote:EO.WebBrowser.BrowserOptions options = new EO.WebBrowser.BrowserOptions();
options.EnableWebSecurity = false;
EO.WebBrowser.Runtime.SetDefaultOptions(options);
However, I'm getting a "The type or namespace name 'BrowserOptions' does not exist in the namespace 'EO.WebBrowser'". So I did a little more digging, and I read that I need to reference some .dll files. However, I installed EO.WebBrowser from the Manage NuGet Packages section in Visual Studio, so there aren't any .dll files to reference. I did find some .dll files in project > packages > EO.WebBrowser.20.2.34 > lib, but I don't seem able to add those as references. Any one have any idea what I'm doing wrong with this one?
Secondly, I'm going to be working with elements (mostly radiobuttons, dropdowns, and textboxes) that are sometimes inside an iFrame and sometimes not inside an iFrame. I found that the below code works wonderfully for items not in an iFrame:
Quote:webView1.EvalScript("document.getElementById('element').value = 'text';");
I read online that the below code will work for iFramed items:
Quote:webView1.EvalScript("frames[frame_name].document.getElementById('user_name_id').value='user_name';");
However, is there a way for me to check if an element exists on a page (iFrame and not iFrame)? I need to run a series of code once my application has determined that a particular element exists, and no amount of Googling is providing me with a solution :(.