UI Test Automation In .NET [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I want to know how could I write a program in C# that opens a browser and go to google.com (I did that easily)
I want to write code to automate move mouse to the input text field, click the mouse and then enter some text. move mouse to search button and hit it.
I know I should deal with iAccessible interface but I did not find any useful source.
Any help will be appreciated.

You can also try Winium, an automation library similar to Selenium through which you can do automated testing and instruct it to perform testing even on remote machines. We have used it at our organization in combination with Selenium to perform automated testing of Windows and Web modules. It is free to use and open source. Here are the links.
https://github.com/2gis/Winium and https://github.com/2gis/Winium.Desktop

Look at the Windows Automation API: http://msdn.microsoft.com/en-us/library/ms726294(VS.85).aspx
and the Test API: testapi.codeplex.com which has some related packages you'll likely need.
Sorry, can't post more than one link yet, but add the usual bits to get to the TestAPI site on codeplex.

You can try Visual Studio Test Suite it lets you record how you interact with your application and then lets you run it automaticly.
It's a powerful product.

If you're looking to understand UI Automation, I've just started that myself. I wrote this project so that other people could use it or understand themselves too:
http://code.google.com/p/wipflash/
Mostly it's based around the Patterns and Properties. You can see how I've used the Patterns here:
http://code.google.com/p/wipflash/source/browse/#hg/WiPFlash/Framework/Patterns
Hope it helps.
(Edit: I also answered a similar question here: WPF, Project White and Infragistics - you're probably looking for the ValuePattern).

There is a commercial solution that would do the job: Telerik WebUI Test Studio. It also supports Silverlight apps.
http://www.telerik.com/automated-testing-tools.aspx
Here is one positive review:
http://fczaja.blogspot.com/2011/01/ui-tests-automation-for-silverlight.html

Related

developing virtual oscilloscope C # [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am new to GUI development and Embedded programming using DSP Processors.
I would like to build a GUI of 4 channel oscilloscope using Visual C# and Windows Forms. The signals will be communicated from DSP processor using serial port RS232.
What kind of Windows Forms controls help in building such a GUI? and how to start with the work?
If there any other useful tools to be used along with Visual studio C#?
Any useful links explaining the basics of development may be helpful.
What kind of Windows forms controls help in building such a GUI?
There is a nice tool un Windows Forms called Chart. You can draw graphs of different kind with it.
Here is a Tutorial
Here is a Video that shows how to use it.
How to start with the work?
You should start and play with this control.
Learn how to add values.
Learn how to remove values.
Learn how to bind values.
Learn how to handle the axes and the ranges to be displayed.
If there any other useful tools to be used along with Visual studio C#?Any useful links explaining the basics of development may be helpful.
here you find all different chart types that can be displayed.
and here how to use them.
This answer is partly copied from a previous one of mine.
I would suggest to search also for "online/real time display of data with chart control" or "moving chart".
This link might be usefull. It asks for almost the same as you.
Here you can find some samples

Getting started with WPF & Orchestra [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm working on creating my first WPF application, whereas I have only used WinForms in the past. I've familiarized myself with the basics of MVVM, but certainly need practice to get a deeper understanding.
It seems like the Orchestra Shell written on top of Catel is a good way to start a new application as it has many built-in features including an MVVM framework.
The WPF application I'm interested in developing is a utility to help with administration (viewing logs, checking service status, etc) of a specific enterprise application and would include:
Fluent Ribbon
Avalon Docking
Ability for other developers to write plugins
As a WPF/MVVM novice, I'm having difficulty understanding the best way to get going with Orchestra, and it seems as though the getting started guide included in the docs folder on github is a bit outdated.
The examples provided as well as the LogViewer application are great, but I could really use some pointers with getting started. Does anyone know of an up-to-date getting started document for Orchestra, or would anyone be willing to provide some high-level steps?
Here are my preliminary thoughts on the steps required, but I'm not sure if this is the right approach:
Create a blank WPF project
Install Orchestra FluentRibbon using NuGet
Create a main view that contains the fluent ribbon
Create Prism Modules? for each component to be added to the
application
Example of components (Prism Modules?):
Connect/disconnect to application server
Load/show plugins
Any help/guidance would be appreciated -- perhaps starting w/ Orchestra is just not a good idea for a WPF/MVVM novice like me?
Thanks in advance!
The best way to start is to take a look at the examples that are included in the Orchestra repository. For example, the Fluent Ribbon examples gives you an idea how to implement the ShellService.
After that, if you are looking for modularity with Catel and Prism, I recommend that you take a look at the Catel examples repository.
If you have more direct questions, feel free to chat with the team of any of the components using gitter.

WinForms create application walkthrough [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I would like to create a application walkthrough for users to reveal functionality and give a short introduction to the software like this: http://www.dtelepathy.com/blog/design/ux-flows-how-when-to-design-app-walkthrough
This is often used for smartphone apps or browser applications. I've never seen this for Windows applications before, but this should be possible or not?
The application is implemented in C# and WinForms and uses a lot of controls from Infragistics.
It isn't possible to find anything about that on google or SO because "walkthrough" could be anything... :/ Maybe I'm looking for the wrong keywords?
Yes, this is definitely possible in a Windows App. We've done something like this before. I see your frustration regarding lack of documentation on the web. There isn't a lot out there specifically for windows desktop. Take what you can learn from the tutorial that you linked and translate that over. What we did a lot of was used semi-transparent panels containing the necessary content and then just lay those over everything. This way, you can get the 'greyed out' look for the main content of the app but control user's access.
Good luck!

How to override other windows application's elements? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Can you please point me into the right direction?
I want to edit other application textbox or click, programmatically. For example, in a web sites, I can edit elements and invoke button clicks.
I have no idea how to do this, but I can move mouse and use keyboard run time is it possible to edit other application's textbox ?
I have C++, VB.NET, and C# knowledge - any suggestions or sample code?
Thanks.
There is no easy way to do this, but it is possible. You will dig through the Win32 Api to get what you need. There will be a lot code needed for this, too much to put in sample here.
You will need to start with finding the window you want. This could be accomplished with FindWindowEx. When you have the window, you can enumerate the child controls using EnumChildWindows.
When you finally get the handle to the control you need, you can hook up to the windows message subsystem and send a WM_SETTEXT message using the SendMessage function. There is a wrapper function available: SetWindowText but the documentation clearly states that it will NOT work for windows of other applications.
Be prepared for a lot of digging around in the Win Api. You will probably run into issues regarding security in newer windows OS's. When you get it to run the functionality will be highly depending on the OS, UAC settings etc.
I remember doing this once, 15 years ago in Windows 98, even then it was problematic! So good luck!

Automating certain repetive actions in IE based applications via a c# tool? [closed]

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 6 years ago.
Improve this question
http://www.xtremevbtalk.com/showthread.php?p=1221565#post1221565
This thread shows some discussion about what I'm trying to do. I can't use Powershell for this purpose and I'm not an advanced student, so my level is beginning intermediate. Understand concepts, but need lots of help and basic ideas :-)
Can i use a simple control in c# to let me take a internet window I currently have open for our IP phone system, take a string from another IE, or to keep it simple just a text string that I have, and have it submit the form, and fill out the required selections in the IE ip phone (ie, click on radio button, click submit, paste number, and click dial). All of our extremely repetitive actions daily are based on the same routine submissions on the IP phone (and it is TEDIOUS). This would greatly help our company, and we have no developers besides me (student that works on this stuff on the side). I'd really like to streamline some of our repetitive actions.
I'd like to know about the SIMPLEST way to possibly automate. Would VBA be better for this, can c# actually itself be used to control IE, set cursor position, submit requests, etc? I'm using this with mostly IE applications that we use at work, that I don't have source code to, so I'm trying to figure out how to do it as simply as possibly.
Beginner friendly reponses please. Dumb it down a little for someone who is still learning the foundations!
I have been investigating this some time ago and found a good tool for this: WatiN. It is normally used for testing web applications, but I think you can also find it helpful. It has an easy to learn API:
public void SearchForWatiNOnGoogle()
{
using (IE ie = new IE("http://www.google.com"))
{
ie.TextField(Find.ByName("q")).TypeText("WatiN");
ie.Button(Find.ByName("btnG")).Click();
}
}
look at this post. On the way even Google's WebDriver

Categories

Resources