How to use WebAii and WatiN with Same Browser - c#

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.

Related

How can I control Google Chrome browser without Selenium, or other webdrivers?

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)

How to use Webkit browser with watiN

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

How can i automate sharepoint people picker with watin

I'm new in automated testing (Watin for IE) and i came across with some issues automating the People picker of sharepoint. I can't take the controls within the pop up because the pop up blocks main page (blocking also Intenet Explorer Developer Tools). Someone knows how can i do it or at least the name of the controls for IE?
Thanks
If it is a modal dialog that is getting you bothered, you can try this.
Open the SharePoint site in Firefox and then open the People-Picker. In firefox you would have the URL displayed for the modal dialog too. And from there you use the URL to open it in a new browser tab directly and use a web development tools plugin to view the DOM.

Access Firefox from C#

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.

SpellCheck in WinForms WebBrowser

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.

Categories