UI Automation in WPF [closed] - c#

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Can anyone help me how to do UI Automation in WPF? I want to check the operation of a Grid.

If you just want to automate WPF and NOT WinForms, check out Telerik's free framework. There's also a paid version if you want more features like record-and-playback.
Two open-source C# libraries that support automation of both WPF and WinForms controls are:
White
I've used this, and found it to not always be reliable.
QAliber
I've used this, and found it to be good but needing work.
Both are open-source, so they'll show you how to use Microsoft's API's, and you can modify them to meet your needs.
I've also used Coded UI Test and Ranorex, but they're both $$, and I don't care for record-and-playback because I feel it's a maintenance issue. (Although QAliber does have a record-and-playback feature and White also has an alpha-quality recorder.)
Of course you could always go it directly from Microsoft's API's if you really want to get down and dirty.

Use the tools built into Visual Studio - Coded UI Tests:
http://msdn.microsoft.com/en-us/library/dd286681.aspx
There are two methods of doing this: Record and generate code (tends to be a good starting point, but often doesn't give you reproducible tests), and manually coding them up via UI object tree.
I ended up doing the second option most often, because I liked the code I wrote much better than what the recorder functionality offered.

You can try PROJECT SIKULI:
Sikuli is a visual technology to automate and test graphical user
interfaces (GUI) using images (screenshots). Sikuli includes Sikuli
Script, a visual scripting API for Jython, and Sikuli IDE, an
integrated development environment for writing visual scripts with
screenshots easily. Sikuli Script automates anything you see on the
screen without internal API's support. You can programmatically
control a web page, a Windows/Linux/Mac OS X desktop application, or
even an iphone or android application running in a simulator or via
VNC.

Here is a good blog post to get you started on UI Automation:
Silverlight UI Automation Testing using Prism 4.0
It's Silverlight based, but the Silverlight is very close to WPF, and the UI Automation concepts involved are exactly the same.

Related

The right technologies for Web and mobile app development [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am planning to realize one of my ideas. Therefore I would like to develop a web application and seperate apps for iOS, Android and Windows Mobile.
The application will write and read data in/from a DB.
Because I´ll start completely from scratch I´m open minded to all technologies.
I´ve never developed a website with business logic before and haven´t done mobile app programming yet. I am familiar to c#, .NET, HTML, CSS, JS and I love to work with Visual Studio.
As you may already assume, I want to share as much business code as possible. After doing some research I think using Xamarin to develop the mobile apps in c# would be a good idea. To share business code between web and mobile I thought about implementing a webservice which both clients could call.
Before I start with coding and may choose the wrong tools for the job I want to evaluate what would be the best way to do it.
It´s no must to use the technologies I´m familiar to, I´m willing to learn any technology if this brings a real advantage. Anyway it would be great if I could use c# and the .net framework.
To eliminate any missunderstoodment, I´m not searching for one perfect fitting technology, but for a stack of technologies which fit together perfectly and do the job best.
Which technologies could you suggest me for the job?
This is my first post on stackoverflow. Please inform me if I´ve forgotten any important information.
Thank you in advance.
For me, if you normally use .NET for developping, using Xamarin can be a very good solution for the business logic, mostly if you use ASP.NET 5. You should do a very good job mixing, ASP & Javascript for the website and a lot of business logic & data should be done after this develpment for the mobile part.
You juste have to create a good architecture to avoid specific code.
For Xamarin the negative point can appears if you have a lot of specifics platforms features to implement.
Let's explain this point :
Xamarin offer us two way to develop Cross-Platform applications, you can share UI & Logic ( Xamarin Forms ) or you can only share the Logic ( Xamarin Core ).
The advantage of forms is that you can easily code a cross plateforme UI with a simple design.
The disadantage comes when you want to do a lot of specific coding for each platform or used native features ( for this case the best solution is to use Xamarin Core )
And if you use the Xamarin Core, you should know IOS, Android & Windows Phone bases, because you use a "copy" of the native code for each platform.
The last point that I can suggest for the mobile part is to use a JS Framework like Cordova, this can be a good solution to do the website and the mobile applications in a single time.
This kind of platform have the same problem than Xamarin.Forms, if you want to do some specific coding for each platform or use native features from each platfom, you will need to install plugins & possibly create specific code.
I hope my explanation can help you to choose the best way to develop your application
If you are familiar with C# and Visual Studio, Xamarin is perfect solution, but if you want to use web technology then you have many options to use such as Cordova or TypeScript (TypeScript is typed superset of JavaScript that compiles to plain JavaScript. It works everywhere and is open source).

WPF app - GUI first? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I want to build a management system using Windows Presentation Foundation. I know there's Expression Blend for Graphics design and VS for C# code.
my question is, should i build all UI first using Blend (Buttons, Windows, other elements) and then writing all code (Data bindings, database connections, etc.) or should i build it one step at a time ?
It's my first time using this tech, I've used Windows forms in the past and i want to implement some good-looking graphics in my app.
WPF is intended to make following either UI-first, code-first, or parallel approaches possible - particularly with an MVVM architecture.
However, I suggest starting by putting together a vertical slice through all layers of your application. Reality tends to bite, and depending on how you put your architecture together you will undoubtedly come across many issues that impact your chosen approach.
Since UI is important to you, "Blendability" (the ability to use blend alongside a VS solution) is likely to be a requirement. In this case, you'll want to research carefully how to create a solution structure that will support this.
I think you should take it one step at a time. Don't worry about too many frills in the UI, you can always add to it more later. Keep in mind how you want it to look, and afterwards you can create better looking styles etc. in Blend.
I personally use Visual Studio for most of my development, even the UI. I use blend for creating templates or styles mostly. It used to be that blend was superior to Visual Studio in the designer support, but with VS2012 it has gotten quite good. Also, Blend has a learning curve, it would take some time to get used to. Since you are new, I would suggest not overcomplicating things for you.
The number one thing you need to know about WPF vs. Winforms is complete separation of UI/App logic. It is often much easier to create "ViewModels" with properties and bind those properties to the GUI. If you try to get too involved manipulating GUI elements from code, you'll start digging yourself into a deep hole. The GUI should be databindings, triggers, behaviors, templates, etc.

Beautifying a Windows Form application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I will be creating a small database-driven Windows Forms application for my C# project. I wanted to beautify it like we do on web sites using CSS. Are there any resources or sites which can help me in beautifying my application?
You could try a library I built some time ago.
http://www.codeproject.com/Articles/33716/Fancy-Windows-Forms
"Beautify" and "Windows Forms" are not often used in the same sentence. WPF allows for significantly better design opportunities.
Some frameworks allow you to skin a WinForms application, which allows you to drive look through configuration rather than code.
How do I skin my Windows Forms application?
There's also a CodeProject project that provides a skinner, though I have not used it personally
http://catalog.codeproject.com/Articles/415102/WinForms-Form-Skin
When I used to write small WinForms utilities without access to a framework, I would subclass each major control, and apply a style in that subclass. One change to the subclass affects the entire app.
CSS-like styling is difficult in Windows Forms, because the framework wasn't really built with it in mind. If styling is important to you, then you will probably have a much easier time of it using WPF instead.
I know of one third-party library designed to help with skinning WinForms applications, DevExpress WinForms Skins. I don't have real experience with with it, though, so I can't make any comment on it.
You can't use CSS to style a WinForms application, but I don't think that's what you mean anyway.
As far as "beautifying" your application, there are a number of 3rd-party tools available. The most popular ones are (in no particular order):
Telerik
DevExpress
Infragistics
ComponentOne
Many, many others
People tend to get religious about their 3rd-party design tooling, and a lot of ink has been spilled on SO going over the benefits of each 3rd-party design tool.
If you google ".NET custom theme" then you can get many free styles to use in your projects.
Here is a list made by some user over at hackforums of his styles and custom controls, which I think help make your form 'Custom' and 'Nice': http://pastebin.com/1nvZ08kx
I've used the WebBrowser control to create an interface before. With it you can use HTML and CSS to create a pretty nice looking "form". It requires a bit more coding, but it works. A user needs IE installed to use the control though. There is a VB.Net example here:
Using VB .Net WebBrowser Control To Build WinForm User Interface
In any case, it's another option.
If you are interested in third-party tools for designing Windows Forms applications you could also take a look at the Infragistic's one - AppStylist for Windows Forms controls. There is a short video for the runtime version of this tool.
Another useful page for getting started is Application Styling Framework.

Silverlight 3 and component library advice [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have to build a web application in a couple of weeks in your usual 3 tier, UI/Business Logic/Data Store, type way, however the customised UI really isn't achievable in anything but Silverlight or Flash (lots of custom vector drawing, fades, animation type stuff etc.).
Given I'm not a Flash developer, but am an excellent C# programmer, I'm going to use this project as an excuse to learn Silverlight 3. So, I have a couple of questions which I'd love to hear some thoughts on, to save me a lot of time up-front.
What is a great Silverlight 3 book? Unfortunately I'm not seeing an O'Reily book, which is usually my first preference. I'm looking for a book that gets right down to business, not a 'history of Silverlight' book. Here's a canvas, here's how you draw into it, type of thing. Is there value in buying a Silverlight 2 book, or has enough changed to not make this viable?
I want to use a mature Silverlight control library to take care of buttons, gauges, graphs, etc., so I can get on with the custom stuff I need to do. I've noticed there are a few different vendors. The ones I've looked at are: Telerik, ComponentOne, Infragistics and Syncfusion. Frankly they all look pretty good, but I'd love to know if anyone has concrete experience they could share to help me make a decision.
I've been noticing that Silverlight apps seem to run into performance problems vs similar Flash apps. Even the demos of the control vendors I mentioned in (2) seem to run at very variable framerates (I'm testing on a Mac with Safari 4 using Snow Leopard, but I notice this on IE and Chrome too on Windows 7). I don't mean to create a Silverlight vs Flash flame war here, it's just what I've noticed. Does anyone have gotchas I can steer clear of?
Thanks for your input.
Regards,
Shane
I can speak for number 2. I've used both telerik and silverlight control toolkit.
First off, the toolkit is free.
Open source, means you can edit your controls. Not updated very often.
Skinning is not really intuitive as telerik.
Telerik is very fast when it comes to updating their controls. Such as when SL3beta came out, they had a build 1 day after. When it comes down to customization, skinning is not really that simple for a newbie silverlight person. I went into editing their styles before i found out about skinning. Telerik's controls are not very flexible when it comes to customization as opposed to the open source sl toolkit.
They never crashed for me, my application sometime loads up over 100,000 rows in their datagrid at one time, loads fast also. I think they have a demo with over 1mil records.
All in all, telerik is commercial, you can get both the free control toolkit and telerik to look and perform the same, but telerik is somewhat noobproof and cuts your development time to about 1/3 of that for toolkit.
How i learned silverlight?
I was fooling around since the beta for wpf and used that knowledge in silverlight. How i kinda perfected that skill, I watched all of the tutorials from silverlight.net. Those give the foundations then whatever feature I want to use, I'd google it.
I was in your position regarding choosing a toolkit recently for a GIS application, which led me to ComponentOne's Silverlight Studio. The controls themselves are fantastic, but perhaps more importantly I have found the support (even during my free trial period) to be incredible.
disclaimer: I am in no way affiliated with ComoponentOne, just a happy customer.

Implementing a window manager like VS does it [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
My boss thinks the VS 2008 IDE Window Manager(autohiding, docking of Solution Explorer, Properties, etc) is the best thing since sliced bread. I can't find a control that resembles that functionality in the Toolbox. Is there a control like that available that you know of? Or should I go ahead and implement it myself? Btw, we're using VS 2008 Express.
You don't have to create something that looks like the VS window manager - you can use the actual VS one with the Visual Studio Shell.
I believe it's aimed at creating developer tools, but I see no reason why it would have to be used that way. It's a bit like the Eclipse RCP, as I understand it.
I implemented in a real project the DockPanel Suit by Weifen Luo that worked very well and it is in production right now on a quite complex application (it is an application for the financial market that had very strict UI requirements in terms of performance and stability). It is really a very good implementation.
I even had to do some custom modifications and found the code to be very understandable and well written.
I'm sure there are several comparable comercial implementations from companies like Infragistics and similar, but if you are short on cash or just don't care for commercial support services for your components you can give it a try:
http://sourceforge.net/projects/dockpanelsuite
I just hope you're not developing a standard line of business app for non-technical users.
I was involved in a line of business app. that tried using the Magic library (from memory) and implemented property windows etc, so it looked "just like Visual Studio".
Then we released a prototype to the end users and they hated it. These were non-technical finance and accounts type people, some even power users. The major complaints were "windows don't stay in the same place", "too easy to accidently drag windows", "too fiddly" "my window keeps disappearing" etc etc.
Just because your boss thinks the Visual Studio IDE is great doesn't mean a thing if your target user group don't.
Don't forget that Visual Studio was designed/built by developers for developers. If your users aren't going to be overly technical it might be very wise to do some prototyping with them first.
There is a very good opensource project just for this. Look on SourceForge for DockingSuite Dock Panel Suite.
You should check out SandDock. The older versions were freely licenced (dunno if they are still available) and the newer versions are relatively cheap, especially considering the amount of time/money/sanity they would save you.
I would strongly recommend against trying to roll your own VM component. There is just too much work involved, and it wouldn't be worth it, if it wasn't your primary product.
Magic Libary
Dock Panel Suite
Dock Container
I personally think Magic Library is the best. Can't remember if it's OSS though.

Categories

Resources