C# Windows Forms Interacting With Web Browser - c#

I have developed a Windows Form application in C# that interacts with a phone system.
I would like to add click to dial functionality to the application.
When I click on a telephone number in a web browser I would like to copy the telephone number into a string and execute some code in my Windows Form application.
I have looked into using Selenium but it seems that the user must be using an instance of Chrome that Selenium has created to complete the above task.

In the end, I used the tel: protocol used in HTML href.
I then set my program to be the default handler of tel:.

Related

How can I request the user to open Desktop Application in React?

I couldn't find the exact answer I was looking for. I have two applications - web application built with react and desktop application built in C# Forms. What I want is if the user goes to a certain page in the Web Application, the browser should open (with or without a request) the windows application and send data, like the user's id. Could you guys give me an advice how this can be done?
For that, when installing your windows C# form in the user machine, you need to register a custom protocol in the registery.
See How do I register a custom URL protocol in Windows?

Is it possible to open a web browser and interact on simulator when running xamarin ui tests

During my test I need to login to the app. When in a certain mode the app requires a one time password. This is created for testers on a webpage that is periodically updated with new codes. Is it possible to open a browser window and interact with it and the app in a Xamarin UI Test.
Example :
app.Login(username, password);
app.MenuNavigation(MenuItems.PrivatePage);
app.EnterAccessCode(code);
//This is where I would need to enter the code from webpage.
If that browser is embedded inside your app through a webview or something else, the answer is yes. Otherwise no.

C# Windows notifications on webmail browser control

I'm looking for a possible solution to an issue im having with making my C# Helpdesk Application (Windows Forms App) to display a Windows Notification when a new email comes in on the Web Browser loaded to the user's webmail.
Our current application has a tab control in which 1 of those tabs are "Email" within that tab is a GeckoFX browser loading the webmail portal from Zoho.
I'm very new at code & building apps in general and just starting out in C# so I'm looking for possible resources or answers on this matter.
Thanks

How can I call a win app on client machine from my aspx web page?

I want to call a windows application on my clients machine from my aspx page , and If It's possible I want to send some parameter to the application . Any guids ?
The only way you can do that is to custom-develop an ActiveX control and host that control in your page. Then the user would have to allow ActiveX controls in his browser. Normally, a browser is a sandbox, so you cannot access Windows from it... But with ActiveX, this is possible.
Here is a tutorial for developing ActiveX controls in C#: http://haseebakhtar.wordpress.com/2011/05/31/creating-an-activex-control-in-net-using-c/
Of course you can still use the old way, that is VB6 or C++...
You may use Shell API in javascript to invoke your windows application. This works only in Internet explorer browser. You need to make sure that your browser security settings (At client) is also changed to "run activex controls"
Here is a sample.
I don't know the specific details, but this might point you in the right direction.
For instance, some IRC applications react when you click a link whose target is irc://some.host.com
Same goes for textmate application for mac:
txmt://open?«arguments»
This, however, is only possible if the target application has registered a custom URL schema in the user's machine. Furthermore, the User has to allow access to it.
You could write a ClickOnce application that you can launch from the web page.
If you make it a full-trust application, you can use it to launch the local Windows application. You can pass arguments to the ClickOnce application, which can parse them and pass them on to the local Windows application.
Alternatively, if you are the author of the local Windows application (and if it is C#/.Net) then you could make the Windows application itself a ClickOnce application.

writing browser plug-in in c#

I wrote a desktop application in c# with Visual Studio 2008 and I want it to communicate with browser following this scenario: once a user opens a bank website an event should be sent to the desktop application.The link of bank is predifined (known).In other words I want to develp a browser plugin which fires events to the application if users opens the link.
At this stage I want just for one of the browsers Mozilla or IE9.
Any idea or tutorial how to start developing such a plug-in?
Developing an IE 9 Browser Helper Object is relatively easy. Look for "Browser Helper Object". In Firefox you can't develop plug-ins in C#, it has its own extensive plug-in framework. You'll need to freshen up on your JavaScript.

Categories