5

If you are concerned about learning too much, you are doing it WRONG. The more you learn, the easier it will be for you to solve common problems. We are getting questions DAILY here which would be solved trivially by having some (very little) programming experience - which is very obviously missing. And in some cases, even willingness to learn is missing. ...


4

You can run it using BrowserWindow.Launch("http://www.google.com/", "-private"); Official information is available on CodeProject.


3

ui element tagging tends to be brittle. The tool you end up using will find elements in different ways. So you'll likely change up based on the tool you use. Hopefully the tool you pick makes it easy to change 'selectors' (find element logic). testers tend not to have some of the technical skills or experience that developers do. Look into using Telerik ...


3

Since you are using CodedUI for this I would write something like this. public static void GetAllElements(BrowserWindow bw) { var a = bw.GetChildren().Where(x => x.GetProperty("TagName").ToString() == "TD"); foreach (var control in a) { Console.WriteLine(control.Name); Console.WriteLine(control....


3

(This was meant to be a comment, but I do not have enough rep to do so) If you can find the ComboBox within your page, you should be able to iterate over all of the different options. If you can do that you should be able to check the ValueAttribute within the option. Once you find the option that you would like to select, you should be able to set the ...


3

Always use the explicit wait to let the webelement get loaded before performing any execution on it. A very common method used for the wait is as follows. /* Initialize the WebDriverWait, with 30 seconds of wait time. */ WebDriverWait wait = new WebDriverWait(driver, 30); wait.until(ExpectedConditions.visibilityOfElementLocated(By.name("user"))); Add this ...


2

First get the browser window process. public static Process proc = null; [ClassInitialize] public void ClassInitialize(TestContext context) { Playback.Initialize(); BrowserWindow _bw = BrowserWindow.Launch(new Uri("about:blank")); proc = _bw.Process; _bw.CloseOnPlaybackCleanup = false; } Then in your test method create a new browser ...


2

The issues in the question sound pretty typical of Selenium users and development/QA teams in general. ui element tagging tends to be brittle. Automated testing make the most sense when the interface stays the same but the implementation changes. If a page tends to change a lot, it may make more sense to test it by hand, or to test it with a ...


2

Using a similar logic to what you already have I would simple loop through based on your xdoc. using System.Xml.Linq; XDocument xdoc = XDocument.Load("uielements.XML"); string name = "'ele_child123'"; string find = "//element[@name=" + name + "]"; foreach (var childElem in xdoc.XPathSelectElements(find)) { string childName = ...


2

As far as I know unless you create Ordered Tests the tests are always executed randomly as this is the preferred way of executing them to ensure there are no dependencies between them. Otherwise you could end up with a test that passes just because you executed another test previously.


2

My personal opinions: Trying to analyse the testing environment closely, identify as many variables that may have effect on testing results as possible Invite fresh eyes to aid you during this process of variable identification, but please do this after you have done it so you can compare your results against theirs Trying to have a very controlled testing ...


2

After getting idea from Tango199 answer, I modified his solution and have now implemented below code (once ComboBox is found): HtmlListItem html_listItem = new HtmlListItem(html_comboBox); html_listItem.SearchProperties.Add(HtmlListItem.PropertyNames.ValueAttribute, str_Value); html_listItem.Select(); where str_Value = Value Attribute (like 7311, 7312) as ...


2

If you are building a DevExpress desktop application with WinForms then you need the extension to be able to interact with the DevExpress components. CodedUI is very limited without it, it creates extra hooks for MS UI Automation framework. If you are testing a web-application with DevExpress tooling then I do not think you need to install the extensions. ...


2

Of course you can use the WOM/POM. You need to consider DRY (Don't Repeat Yourself) and Single Responsibility/Ownership (Each function is owned by exactly one object, and is the sole responsibility of that object). You can define parent/child relationships within your model objects to deal with the fact that your application creates child windows. So, if ...


2

I think Martin Fowler's definition of Page Objects is really helpful: Despite the term "page" object, these objects shouldn't usually be built for each page, but rather for the significant elements on a page https://martinfowler.com/bliki/PageObject.html Then, as Kate has suggested, you can continue to use good practice OOP principles for each of your ...


2

I think the basic level of coding skills will be sufficient however, I would completely avoid the record-and-playback/generated code approach in Coded UI. I also recently switched from UFT (VB Scripting) to Coded UI (C#). Not sure if you are planning to convert your existing UFT scripts to Coded UI or will be developing the hand coding framework from the ...


2

Seems Coded-UI does use UIA underneath, but also some other technology. Coded-UI test is a Record & Play automation tool which uses the Microsoft UIA Library underneath. Since being a tool compared to writing code in C# it improves QA productivity for recording more test cases. https://stackoverflow.com/questions/4909206/microsoft-ui-...


2

I just came across this myself. You should be able to simply use the following: AutomationElement ae = u.NativeElement as AutomationElement; But be careful to reference the correct assembly in your project - I had issues when referencing UIAutomationClient and had to reference UiaComWrapper instead.


2

Here is the Attributes: Data Source Types and Attributes Excel, ".xlsx" format [DataSource("System.Data.Odbc", "Dsn=Excel Files;Driver={Microsoft Excel Driver (*.xls)};dbq=|DataDirectory|\\data.xlsx;defaultdir=.;driverid=790;maxbuffersize=2048;pagetimeout=5;readonly=true", "Sheet1$", DataAccessMethod.Sequential), TestMethod] where "data.xlsx" is the ...


1

As per your code, you have already logged in that's why in second loop you can't find the By.name("user") element. Before ending the loop logout from the application and just after starting the loop re-load the base url using code driver.get(baseURL);, so that you can come to the original page.


1

screenshot on failure. I had a problem where I was actually on a completely different page than I was expecting because of overlapping elements when I clicked a link. A screenshot can give really good information as to what is actually happening.


1

The support matrix is right: Java GUI testing is not supported by Coded UI Test. Generated code from recoded MTM test-case uses native Windows OS elements to work with and all actions (mouse clicks & key typing) are linked to them, e.g.: ... Mouse.Click(someClient, new Point(239, 90)); Mouse.Click(someClient, new Point(139, 193)); Mouse.Click(...


1

You can download a 90-day trail of Visual Studio 2015 enterprise to test it out. The Coded UI testing framework relies on the Microsoft UI Automation framework. Any GUI tool that does not implement MS UI Automation hooks cannot be automated with Coded UI. It seems the Java SWT uses native windows controls and this should be automatable with Coded UI ...


1

you could use the FilterProperties if it is supported by the technology you use to find your control. FilterProperties works as a "Or" when SearchProperties works as a "And". The code should be: this.FilterProperties[WinWindow.PropertyNames.ClassName] = ".class1" this.FilterProperties[WinWindow.PropertyNames.ClassName] = ".class2"; You can still ...


1

I'm too using CodedUI for functional automation and had used the same kind of code for reusing the browser, as reopening the browser for every test case is a overhead and effort consuming. Since our application too supports multiple browsers and hence, I too faced the same issue and from the research I made at that time, I came to know that this is a known ...


1

Talk to developers to give the item permanent id. Not sure why name is changing, in my experience ID is usually dynamic, generated by framework and name is left alone. If you cannot get permanent ID, or name, try adding CSS class (and locate element by class). Or use CSS-style locators. Failing that, you are in for a world of pain: forever-flaky XPath. :-...


1

A possible solution for this issue could be to find the label control containing the value you are looking to select, then find the child control (which should be the radio button) then selecting the radio button. String labelToFind = "Senior"; BrowserWindow browser = BrowserWindow.Launch(@"pathToHTMLFile"); HtmlLabel theLabelToFind = ...


1

I think I got solution for the same, actually I was looking the VSTS Performance tests in wrong way. Unlike other performance/load testing tools (like JMeter) VSTS is picking up values from csv file per Iteration base not per User base. So, in VSTS if there is only 1 iteration while number of users as 4, 10 etc. (any number), then it will always pick only ...


1

An answer to your second bullet point, from one project I've experienced recently: Allow the QA department to draft developers as extra testers for UI tests. Allow the developers to spend some time on automating UI tests. Suddenly a lot of boring, repetitive tests got automated. Make the testers/test analysts available to help with unit tests, especially ...


1

If your company has a subscription to PluralSight I would recommend them for some of your initial training. Microsoft offers several certification programs here are a few: https://www.microsoft.com/en-us/learning/mcsd-application-lifecycle-management.aspx


Only top voted, non community-wiki answers of a minimum length are eligible