Hot answers tagged

5

Yes, you can use NUnit for functional testing. But still it is a unit-testing framework. No, you are not creating unit-tests by using a unit-testing framework to write functional tests. A unit-test is testing just a single methods input and output, by writing end-2-end tests it by definition cannot be a unit-test. :) Unit testing frameworks are often ...


5

The JSON Wire Protocol is on it's way to becoming accepted as a W3C standard. This means that moving forward, the vendors behind browsers will have much more incentive to implement and maintain implementations for their browsers. Some vendors such as Mozilla and Microsoft have already taken over maintenance of the drivers used by Firefox and Edge. I heard ...


3

I got the same issue when I use Firefox 39 with Selenium 2.45. After that I upgraded to Selenium 2.46 and the issue got resolved. I think that the problem is the Firefox and Selenium version agreement. Note: the default setting will make the Firefox update automatically.


3

When is a good time to develop new automated test, and who should be responsible for this? Developing the structure of the automation can begin very early on in the process. Once the requirements are set the objects can start getting built out, be put into classes and a lot of the assertions can be built that way all that remains is ToDos that hook ...


3

All-in-one: SeeTest Mobile web: Windows Phone Web Driver BridgIt Native apps: CodedUI Winium.StoreApps windows-phone-8-bootstrap Hybrid apps: CodedUI Winium.StoreApps.CodedUi Silverlight apps: Windows Phone Driver P.S. If you know other solutions, please share. Thank you.


3

According to The WebDriver Sampler: Your Top 10 Questions Answered article the information can be obtained from Selenium Changelog, for instance for Java client libraries: v2.52.0 ======= Firefox: Weakening platform restriction to enable 64-bit support Fixing closed window handling in FF45 So my expectation is that version 2.52 ...


2

The answer was buried in some MSDN documentation that was challenging to google-reach: http://blogs.msdn.com/b/visualstudioalm/archive/2013/09/16/using-internet-explorer-11-and-not-able-to-record-a-web-performance-test-successfully.aspx Also ... don't forget to enable the test tool. Might have to check a couple places.


2

One possibility: Run each thread against its own instance of the application. Depending on the cost of instances, this may be too expensive. But it does eliminate crosstalk among tests.


2

I believe you are getting this error because : You are immediately (before the page load could finish) searching for an element and finding it. there are 3 options in a dropdown and on selecting each option, rows in a table gets populated. When dealing with asynchronous pages use proper waits after every anticipated page-load. Insert an explicit ...


2

I really like the answer from the link Philip Beadle posted in a comment: It's a bad idea to test the core browser's behaviour as it's not your logic, i.e. you should not need to test that arrow keys work with options since that's something your browser implements. And some Protractor (JavaScript) examples how to handle the drop from the same ...


2

Webdriver is faster, as compared to RC Webdriver mimics much more closer to real-life interaction; as compared to RC WebDriver supports more languages WebDriver is more actively followed/supported now; RC is past details: http://www.guru99.com/introduction-webdriver-comparison-selenium-rc.html


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

Ask your developers to add a name (which does not need to be unique) to relevant elements. find_elements (Java may have different spelling) returns a LIST of elements. If you cannot have name, you can find by CSS class. Xpath is locator of last hope, too brittle and too slow.


2

Try using //li[@class='moreGenres']/span as an xpath For css, what you have - .moreGenres>span does work - so see if maybe you have that li in more than one place perhaps? or maybe make it a bit more specific such as li.moreGenres>span or ul>li.moreGenres>span or (better) ul.this_list>li.moreGenres>span It might also be ...


2

I've been using Ranorex for web automation testing purposes for 3+ years now, and I can say it's the best UI automation tool I've used so far. The application under test is a fairly huge site, where the end users can create individual accounts, but also enterprise ones that, depending on the account type, have a LOT of options that can be tweaked, ...


2

Instead you should create Firefox profile in order to invoke it locally. Refer this : http://www.howtogeek.com/209320/how-to-set-up-and-use-multiple-profiles-user-accounts-in-firefox/ This should resolve your problem.


2

The point is the relative offset to the found control, thus it is not depended upon screen resolution or anything. Coded UI first finds the control and then the mouse.click adds an offset, then same you clicked when U recorded it. Read more about it here: ...


2

(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 ...


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 ...


1

The main advantage is that a Webdriver and RC suites are they allow you to use a programming language in creating your test scripts (not possible in Selenium IDE). Following programming languages are supported by WebDriver (but others have some 3rd party support) Java .Net PHP Python Perl Ruby Where they differ; WebDriver is faster than Selenium RC ...


1

I got the solution for the above issue, the code line html_hyperLink.SearchProperties.Clear(); was causing problem, after removing this line test cases are working fine as required.


1

I see two possible intepretations of your question here. The first is "How can I improve the speed of how elements are found on a page?". Another is "How can I improve execution speed of my suite of tests?". The first question has some answers already. You've found that xpath vs id doesn't provide much speedup, so you're almost at the end of the road ...


1

I run my Coded UI tests from the commandline with /Logger:trx this generates a .trx file vstest.console.exe "MyApp\Debug\MyApp.CodedUI.Test.dll" /tests:TestCase1,TestCase2 /Logger:trx You find the vstest.console.exe in your VS directory: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\


1

Click on Upload File Copy your Path in Clipboard (as Shown in the code) Press Ctrl+Vand hit Enter using robot class StringSelection selection = new StringSelection(file); Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); clipboard.setContents(selection, selection); robot.keyPress(KeyEvent.VK_CONTROL); robot.keyPress(KeyEvent.VK_V); ...


1

As always, it depends. If the application developers have been building unit and integration automation that runs with each build, you aren't as far behind as you would be if no low-level automated checks existed. QA is usually in charge of automated GUI checks and may also be in charge of some of the high-level headless automated checks (such as API ...


1

Usually developers write unit tests (because unit tests are close to the code developers know well). Automated GUI test use different instrumentation (Selenium?) so need a bit different skillset. Sometimes might be even developed in different language: because GUI tests are inherently slower, it might make sense to use language like Python which allows you ...


1

Is NUnit only a Unit testing framework? NUint is a .Net port (commonly used with Visual Studio) of JUnit (which is commonly used with Eclipse). So it's different than the standard 'unit tests' in a VS project. Generally those unit test are testing each function of the application. xUnit tests do test through the UI level. I think your hangup is on the ...


1

I found one more way (definitely there can be other ways too) to do this, and using that I don't need to use IF statement and Loop. This has also reduced my lines of code by 50%. LocatorOfPartialLinkTest = xlRange.Cells[rowValue.IndexOf("Partial Link Test") + 1, 2].Value2.ToString(); LocatorOfLinkTest = xlRange.Cells[rowValue.IndexOf("Link Test") + 1, ...


1

I would recommend using LINQ. This will allow you to 'query' the spreadsheet and pull in the data based on these queries. An example using excel can be found here. As for the execution of it, I would use an enum or array of the different parameters accepted, select those items and then process by the result. If the test cases grow out of hand (IE ...


1

Even many hundreds of if statement will not cause any noticeable slowdown, but you may consider switch/case statement If your goal is only parsing and reformatting text files, you may consider learning IronPython. It has .NET bindings (so you can create Excel spreadsheets and write to them), and you will learn new skill :-) One of best uss cases for python ...



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