I'm looking to automate the GUI available for TortoiseSVN. Rather than using the one provided and manually inputting the urls, I would like to save off various urls that I switch to on a daily basis and at the click of a button switch my working copy to one of my choosing.
TortioseSVN's 'TortioseProc.exe Switch' command does not support the /url parameter until a future release (1.8), this prevents me from being able to embed these easily within an anchor tag (supported by Tortiose) somewhere on our intranet.
Using the standard svn CLI thats compatible with the 1.7 build I'm able to perform switches and automatically close the command line, however I don't know of a way to perform these from a web interface and as I'm not familiar with desktop development I don't know of a plausible desktop solution.
I'm coming to you StackOverflow in hopes you know of a lightweight desktop alternative that wouldn't require much setup on the users side or better yet (web developer by trade) a web solution.
I want to clarify, I'm not looking for actual code but a library or language that will allow me to meet these requirements as I'm hoping to open this solution up to more developers at my workplace and would rather something that allows easy adoption (not a messy setup).
Thanks!
From a Windows/.NET application (whether it be ASP.NET within IIS, or a standalone application), your best way to go is SharpSVN.
Second place would be to write a wrapper around the command-line client.
Related
The goal is to provide a lightweight application (probably .NET) that will provide very limited functionality to interact with a specific web application in our organization (it's Workday, if that helps.)
We have so far done this successfully using Selenium -- requiring each user to have Chrome installed and - importantly - to have the version of chromedriver.exe that is compatible with their Chromium version. Most of the application consists of chromedriver.FindElementByXPath(x).Click and chromedriver.FindElementByXPath(x).SendKeys(t) statements.
However, it's becoming cumbersome to ensure that the right chromedriver is installed for all the users, and we'd like this application to be agnostic about the browser (or at least, support any installation of Chrome, Edge, Firefox on the user's device.)
So the simple question is -- can we execute simple activities against the site (clicking some of the button tiles and sendkeys to populate textboxes) without Selenium?
I'm looking into possibly using Microsoft UI Automation or something that can simply handle clicks and text entry through GETs and POSTs (and no, using an API is probably not an option.)
Don't work too hard studying the link you provided. Why? Because the question is not asking to automate anything but a browser app. Unless of course your app embeds a browser... Automating desktop applications is difficult but can be done.
I'd look deeply into Microsoft's Playwright. It's a Selenium free product for browser automation. It's current team of engineers are the best in the industry, many of them were on the Puppeteer project at Google. Apart from Cypress, Playwright appears to be best in class now. The problem with Cypress is that you have to run it in a pseudo IDE based in a dedicated browser.
I'll try to keep this coherent and to the point, been coding all day and a little fried right now. I know doing this is also entirely possible, I'm just not entirely how to do it directly.
The idea is I'm working on a program I'd like to make commercial and sell in the future. Currently it's been holding up to testing processes and everything looks good, but now that I'm starting the improve the program's GUI, I'm hitting limitations using Windows Forms (EI, tab control tops not being easily recolor-able, etc, etc), and had a thought... That I could make the GUI look infinitly better if I could import the program into a web page. Using a dot net project makes that relatively easy since I can copy the C# code over and after a bit of tweaking, it should be fairly straight forward to get everything running and then I just need to rewire everything to the web page GUI.
To handle launching the web page, I was contemplating making a program that creates a "harness" (Small graphic program that just runs a command prompt line to initialize the web service and provides a link to the web page being hosted on the local service. This approach works, but the big issue I'm hitting while probing this route is that the "Release" folder generated on the web application isn't fully self contained and in addition to this all resources are visible. (Hard to sell a product if the first person you sell it to can just distribute the source code around)
So ideally at this point, I'm looking to see if anyone can guide me in the right direct. I'm not sure how to go about creating a program that runs an app inside a local browser AND hides/otherwise makes all the code / resources (images, etc) unviewable/inaccessible to anything outside the program.
Sorry if this is a bit rambly, not entirely sure how to actually ask/find what I'm looking for. (There maybe a name for the thing I'm looking for and I've just never heard of it before.)
I would recommend you to use WPF windows presentation foundation, you can make much more user friendly and intuitive interfaces in WPF comparing to windows form.
Developing and trying to sell a desktop program as a website is never recommended, the website is meant to be hosted on a server and let the clients access all of its functionalities within the browser. So I would suggest you to go and search for WPF.
You also mentioned that you are struggling to improve the windows form User interface design and are struggling to design attractive GUI. Well this is not true you can make amazing GUIs with windows form. take a look at this link https://www.youtube.com/watch?v=K9Ps66GoD-k this will greatly help you to improve the existing windows form application design you already have developed.
I'm trying to embed Windows-Sidebar-Widgets into my own .Net Application (WPF and C#), but I dont't realy know where to start. I googled a bit but only found SDK and tutorials for widget-development. I found that there is a small service in Windows, running the widgets. My thought was that I could perhaps fake this service and provide his functions whithin my programm, so that I can run and show the widgets.
Does anyone have some tips on how to do this? Or some experience in doing so? Perhaps there is even some kind of libary for that kind of stuff?
If this is not possible it is also an option to switch to an OpenSource widged-manager to use this widgeds, but this is only an emergency solution and the windows-gadgeds would be very appreciated.
Some information about my system:
I've written some kind of small windowmanager for childwindows in my application. And on the top of this I want to show the widgets in some kind of HostWindow.
Any hint will be appreciated.
P.S.: I would be willing to share the results if I (or we) get this working :-)
I've never seen a library for hosting gadgets, but since they are basically just websites you could use the MSHTML component to host any arbitrary gadget in theory.
This isn't to say it will be easy.
You'll need to extract a gadget to some temporary directory, spin up something hosting MSHTML (in WinForms WebBrowser would be convenient), navigate to the appropriate file in that temp directory (discovered by parsing gadget.xml), and shove something resembling the System object into the gadget.
As a starting point, inject some script that sets System = window.external; onload and WebBrowerser.ObjectForScripting = new FakeGadgetSystem().
FakeGadgetSystem will need [ComVisible(true)] and to implement a decent amount of stuff. I'd advise grabbing a widget or two to test with that mildly exercise the Gadget API, and then slowly implement the calls they make. It'll be a long haul for 100% compatibility with the official gadget hosting service.
I know that you can create a separate console application, however, I am in the final stages of testing and my application does not have an interface. Is there a way to simply open a console and interact with that inside the desktop application? This would be in a test method. (I am using C#, in Visual Studio 2008).
Thanks,
badPanda
You might be able to do what you want using AllocConsole (creates a new console) or AttachConsole (attaches to an existing console), but I think there are some limitations to what you can do with them.
See here for the API documentation for AllocConsole and here's the PInvoke page.
Here's a list of lots of Console functions, might be something else useful there too.
This may or may not be helpful, but some of the same techniques of GUI testing can be applied to a console app too, of course.
Here is an article and example code in C# for a user interface test.
Or there are totally different tools/languages that can be used for UI testing, such as AutoIt v3, which is easy to learn and apply. AutoIt does have a DLL/COM control that you can access from your preferred programming language (but I haven't used it that way so I can't comment on how well it works).
Background: I've decided to teach myself C# through WPF, and I'm writing a small application that needs to get a list of Start Menu shortcuts and their targets and store them. Basically, I'm trying to take all the shortcuts and put their target applications' paths into memory. However, I've run into a problem trying to read Windows Installer shortcuts (the ones that point to something like C:\Windows\Installer\{90120000-0030-0000-0000-0000000FF1CE}\wordicon.exe -- Microsoft Office is a good example of this). I did some research and it seems that Windows uses some behind-the-scenes magic involving the Registry to find the actual location of the file.
Question: How can I get the actual target of these Windows Installer shortcuts in C#? A lot of sources I've found point me to the IShellLink interface, but I don't know how to use it with C#. I'd prefer to use Windows API calls (or, even better, a .NET library) instead of manually looking through the Registry, but I'll take any guidance on the issue.
After doing more research, I found an easy answer here. It's basically using a combination of the MsiGetShortcutTarget and MsiGetComponentPath functions of msi.dll.
I'm afraid IShellLink IS the Windows API for using shell links! The Shell API is heavily COM-based.
But the good news is that COM interop works very well in .NET. This site is usually a very good resource:
http://www.pinvoke.net/default.aspx/Interfaces/IShellLinkA.html