I have developed an application(downloader) using C# now i want to integrate it to browser like i want to place a button in browsers if user press that button then my app should execute & start downloading the required file.
I'm largely guessing, but it sounds like you are talking about a "protocol handler", i.e. to handle hyperlinks to "yourapp:some-stuff-here". If so, try looking at Registering an Application to a URL Protocol on MSDN, which gives a C# example of this.
I don't think that what you want is possible, you can however place a link to the executable and tell your users to execute it via the Browser download options (The Dialog that pops up when you click on some download link that asks wether you want to open oder save the file).
It is not possible to immedatly run your GUI application on a browser button click.
Related
I have created a cross platform desktop application using Avalonia framework. It saves the file in a custom extension lets say (.mcuext). I am able to update the Info.plist and make the finder know that my application supports .mcuext, however I am having a hard time trying to understand as to how to process the file once the user either double clicks on it or tries to open it using “Open with” option from the finder. Currently when I try to do that, it opens up the application but gives me an error saying that My application can not open a file of type .mcuext. I know for a fact that there needs to be an event handler but trying to understand where to put it and how to handle it.
P.S. the processing of the file should only work once the user logs in to the application.
It is not a duplicate of Associate my app with its custom file type in OSX and open file on double click
The answers do not cover my queries about event handling.
I want to verify how to make a assertion or verification if this screen is displayed.
I do not have any idea of how to approach this do to this "modal" is not from the webpage, but from the browser.
It is possible to create a assertion of how this can be verified?
Before your test you can get the current window count with following :
int windowCountBeforeTest = _driver.WindowHandles.Count;
After your dialog shows up you can check it with following :
Assert.True(windowCountBeforeTest < _driver.WindowHandles.Count)
While I cannot find a link which absolutely says so, the w3c webdriver specification does not appear to support interaction with browser based prompts and windows.
In windows this mean you cannot interact with basic authentication or download/upload window prompts from the browser. I am assuming this is true on Mac as well.
You will likely need a 3rd party library or tool to interact with it. Within IE11 on Windows I am forced to use InputSimulatorCore to interact and close download prompts from the browser as it does not support auto saving files. I have heard of others using AutoIT but I have never used it.
I am making a WebRTC application and the allow permission to use camera pops up. I know there is no way to remove that but is there a way to automate the clicking of the allow button using selenium on the client's side? because the 90% of the clients are not clicking the allow button, even though we put an instruction to click the allow button and that it is safe to click it but still they are not clicking it and some clicked deny.
Currently my only solution is by letting the client download a c# application and all it does is restart the browser with --use-fake-ui-for-media-stream, but I think its not a good idea. So if there is a way to automate the clicking of allow button please tell me. Thanks guys, your help is greatly appreciated.
You can try out http://testrtc.com/
They use Selenium internally, with a focus on testing WebRTC services. They make sure the allow button gets pressed (=overridden) and replace the camera and microphone with virtual devices and media files of your choosing.
I created a application let say "Mydesktopapp"(which is mix of C# and c++ deliverables and few XML's file).
'Mydesktopapp' can be run by clicking a batch file. Hence once user click on batch file, application gets executed and does it functionality on a desktop system.
Now i want to provide this application to the user through a webpage(so that everybody don't need to explicitly copy Mydesktopapp and then run it, instead user should just open a webpage from anywhere...and should click a button on webpage and application should get downloaded and run.
To achieve this...i created a webpage with a button and published it. On button click i will run the batch file. but i don't know how to embed Mydesktopapp with webpage...so that it get published with it and get downloaded automatically when user open webpage.
I am new to WPF but yes..i don't want to create a WCF(or webservice etc ) instead i just want to enbed/attach this app with my webpage and get it downloaded automatically.
Please provide help.
Your solution is Silverlight or WPF browser application, since wpf is primarily a desktop application, I 'll recommend you to opt for silverlight for the web based solutions
From Microsoft's website
Silverlight is a powerful development tool for creating engaging, interactive user experiences for Web and mobile applications. Silverlight is a free plug-in, powered by the .NET framework and compatible with multiple browsers, devices and operating systems, bringing a new level of interactivity wherever the Web works.
more info on Silverlight at http://www.microsoft.com/silverlight/
I have a webpage that requires users to enter their credentials in a 'Connect to "ServerName"' dialog box and click OK. I want to automate this login proccess using C# or PowerShell. Is this possible? If not, is there another way of automating this?
Looks like you are trying to execute the webpage automatically and that popup is blocking you from doing that, if that the case you can use SendKeys to type in the boxes
Also a macro recorder being fired by a scheduler task will do it.
you can also instead of trying to open the webpage make a WebRequest from a C# application passing the credentials , that will lead you to the same results...
regards
It is possible, but it is probably far easier to use AutoHotkey.
It can be scripted to watch for a window of a certain name and then send keystrokes to that window automatically. Alternatively, you can set up the script so that the user just has to press some key or series of keys in that window and it will be converted to a set of keystrokes.
The download also includes a compiler, so once you get your script right you can compile it to an .exe to distribute.