i am working on an winform application in which i used watiN. Now when i open my website in default winform browser control, than its design become worst. So i want to use Webkit Browser control in my winform app.
I don't know how to use Webkit Browser in watiN.
I also tried to use GeckoFX for it , but it is also not supporting in watiN.
Can anybody please tell me how can i use other browser controls in watin except Default winform browser control.
I am stucked here
Thanks in Advance
Related
I'd like to develop a software, which can start Google Chrome events (like next page, previous page, go to a specific url, open a new tab etc...) without Selenium Webdriver. It's very important!!! I don't want to use Selenium, I'd like to control existing chrome processes.
How can I do this with C# interop services?
How can I fetch JavaScript code into my chrome browser, to solve this problem?
Where can I find a tutorial about this?
Which solution is the best?
Probably it's not a too complicated problem, but I tried a ton of google search keywords already, but I haven't found anything.
You can control Chrome or any other application with UI Automation
(I use Automation Core with reference to c:\Windows\system32\UIAutomationCore.dll)
Use Inspect tool from SDK to see the hierarchy of controls and various properties
IUIAutomation::ElementFromHandle to get IUIAutomationElement from Chrome main window and so on (tested on Windows 10 in C# with Google Chrome Version 74.0.3729.169)
I wrote too much tests in watin and all they work. there is a silverlight upload control in a page and I must use webaii to control that. but I don't want to convert all my watin code to webaii. How can I use watin and webaii with one browser tab?
I have no experience with webaii, but if I were you I'd try this: Use webaii to launch the browser then use the WatiN browser .AttachTo() method to get WatiN to point at the browser that webaii opened.
How can I launch a website in c#, and insert javascript in it?
Basically what I am doing is, I created a windows forms application with textfields that match the textfields in a website, and after filling in the fields in the forms application, it needs to open that site in a browser (with a query string that has the values in the textfields), and then insert some javascript in the DOM which will then add those values in the textfields and then invoke the click command of the submit button.
Thanks.
Omega,
You are looking for Web Browser Automation, see below:
Website Testing - Automation, Autofill, etc. (C# WinForms)
Microsoft Web Browser Automation using C#
Also see if this library helps you:
http://seleniumhq.org [never used it personally tho]
But I don't know why you want to inject JavaScript... if that is to set values of textboxes and button click, you can do it via code behind in C#... You have the Document object of AxWebBrowser or WebBrowser control in Windows Forms and you can play with it!
I hope this helps
Scenario is simple:
If you add a web browser in visual studio it adds IE. If you are logged somewhere with IE it keeps you authenticated like reading cookies or sessions. Web browser component and IE is the same.
So, is there a way to access firefox from c# (like web browser or some way) and lets say load a page and get the html of this page? Or load a page, fill a textbox and click a button, all these via c#?
Selenium is a browser automation framework that will let you perform these tasks using C#. There's a driver for Firefox that works very well.
There is no way of using Firefox from within C# by default. You do have a few options however, if you want to do something with it's rendering engine for example you could use GeckoFX to give yourself a nice C# wrapped GECKO engine.
If it involves testing / automation then you could look into WatiN which supports various browsers or even UI automation.
We are wanting to add spell-check to a website hosted in our application via the WebBrowser control.
If you open our sites in a newer browser like IE9, etc. spellchecking already works in the browser by default.
Is there a way to get this working in the WinForms WebBrowser control?
EDIT: what about making it work in the Frame control in WPF?
Spell checking with IE 11 or Edge is working on Web Browser control and Windows 10 now. I have managed to make it work on a contenteditable body:
foreach (HtmlElement el in Document.All)
{
el.SetAttribute("unselectable", "on");
el.SetAttribute("contenteditable", "false");
}
Document.Body.SetAttribute("width", Width.ToString() + "px");
Document.Body.SetAttribute("contenteditable", "true");
Document.Body.SetAttribute("spellcheck", "true");
I'm planning on trying it myself but IESpell looks like a good client side solution. Should work since the WebBrowser control uses IE under the hood.
EDIT: I had trouble getting IESpell working in the WebBrowser control so I went looking for an html editor and found TinyMCE and another article to use it in WinForms. TinyMCE has a spell check feature.