14

TestNG has been created as an alternative to JUnit in unit testing. While, RobotFramework has been created for acceptance testing. Each has remarkable features: TestNG TestNG is easily integrated into maven cycle and used mostly with Data Driven testing TestNG is pure Java Annotations are easier to understand Test cases can be grouped more easily Parallel ...


8

I think the question should be: Java WebDriver + TestNG Vs Robot. I have worked on both Java + TestNG and RobotFramework. Here is my analysis by points. Ease of use TestNG: You need to know Java & ANT/Maven, loggers and more libraries (depending on your need). Robot: Basic programming language is enough in any language. You can train your manual ...


6

Overview Robot framework is an excellent choice that meets all of your goals. Robot can be used for UI tests (via selenium), REST and SOAP service tests, database tests, and just about any other type of acceptance test. You can even use robot tests to improve your manual testing process. Robot is keyword driven Robot is keyword-driven, which makes it very ...


6

We have found that dealing with third party software in CI/dev environments was a great source of intermittency/failure and pain. So in our CI environments, we always create stub services for third parties. A stub service is basically a fake API service that you control, that behaves the same (or similar) to how the real service does. I would recommend ...


5

It's not a tool that makes you more employable, it's your experience. Knowledge of some tool may give you some advantage but only if you have other skills. No one looks for a guy who can click around in Robot Framework or Selenium or TestNG. A guy who knows how to test (whatever tool is used) - that guy gets the job. Learning RF will not make you less ...


4

Many people's first encounter with automation is to start with a record and playback tool. You quickly learn the limitations of that method because the code it produces is crude and not very maintainable. I do know some people who continue to use a recorder only for the purpose of getting the ID's or other unique identifiers, however there is still a ...


4

This is a pretty complex one to work through, but you can do it with some data diving as well as well as the information you've given. Time and Labor in your group - assuming you have your automation suite in place, each time it runs, you are running (assuming that the suite runs in under a day) with 3 person-days for a total of 24 hours. The cost to run ...


3

From: http://robotframework-seleniumlibrary.googlecode.com/hg/doc/SeleniumLibrary.html?r=2.9.1 Possible values for browser are all the values supported by Selenium and some aliases that are defined for convenience. The table below lists the aliases for most common supported browsers. firefox FireFox ff FireFox ie Internet Explorer ...


3

Putting a sleep in a selenium test is generally not the best solution. Selenium has keywords to wait for some condition on a page, such as wait for condition, wait until element is visible, wait until page contains, and wait until page contains element. These are preferable, since the wait will usually be as short as possible. With a fixed-time wait, you may ...


3

The variable ${CheckboxStatus} is None because the script provided to Execute Javascript doesn't return anything. To fix it, add the return statement: Verify Operator Checkbox ${CheckboxStatus}= Execute Javascript return $('#operators').is(':checked') Run Keyword If '${CheckboxStatus}' == 'false' Check Operator


3

I don't think there is a universally agreed-upon set of best practices. In my experience, the very best practice is to create at least one library file per website page (see page object library for one such implementation). I rarely use .robot files for keywords, almost everything my team does is to create keywords in python. I've worked at four different ...


3

DL;DR: It's possible, but you shouldn't. All the tools you've mentioned are essentially test runners, meaning they execute a DSL focused on test code in someway. JUnit and GoogleTest execute methods according to a code-based instruction*, have class/method-level mocking support, and do reporting. On the other hand, Cucumber and Robot are focused on ...


3

You could use Wait until keyword succeeds The keyword will repeat executing until it succeeds you can specific the time to repeat the keyword like so *** Test Case *** Repeat Keyword Test Navigate to menu Home Status ${status} = wait until keyword succeeds 30 minutes 3 minutes Check run status ***Keywrod*** Check run status ${btnValue} Get ...


2

If you can't determine why the browser won't launch, you can make your tests more robust. Make sure to clean the environment during test warmup, add some retry/wait/timeout wrappers around the section that launches the browser, and kill any processes and services that aren't relevant to the test. In order to find out why the browser is crashing, you can ...


2

To prevent overwriting the earlier results, you can specify where you want the logs and results with command line options --output, --log (-l) and --report (-r). There is also an option --timestampoutputs (-T) for automatically timestamping the result files to get output-20080604-163225.xml or similar. There seems to be at least two database libraries ...


2

You haven't described much in terms of "integration" but from your message I can understand that what you are looking for a way to open new defects in your QC/ALM defects module. This can be achieve in multiple ways: Open Test Architecture API - Open Test Architecture API is a COM library that enables you to integrate external applications with ALM/QC. ...


2

It seems like you don't want to report error if element was not found. In such case, the most straight-forward way is to run the keyword and ignore errors if element is not found: Run Keyword And Ignore Error Click Element id=element_id Also, hard-coding sleep intervals can make your tests slow and flaky. Using Wait Until Page Contains is better.


2

Selenium/Python is what we use and are very happy with it. Re #1: You can write tests in pure Python (without Selenium) to test rest/DB and run them using same test runner. Test are just python programs using Selenium libraries or whatever else you need. And there are libraries for anything I ever needed. Re #2: Python is famously easy to read. Our own ...


2

testerab, you mentioned escaping the equals sign with the relevant HTML escape character. There are two kinds of encoding for special characters in HTML: entity notation and URL Encoding. In entity notation, an equals sign would be &#x003D In URL encoding, an equal sign would be %3D For your problem, the appropriate encoding would be URL encoding. ...


2

At least on http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.html?r=2.8.5#getting-started is nicely detailled installation instructions.


2

Since this question was cross-posted to stackoverflow, I'll cross-post my answer: Unfortunately, the use of test templates more-or-less require that the data is hard-coded in the test case. However, the test template is not much more than a wrapper around a for loop. You could do something like this: | | ${database_rows}= | Run sql query | | ... | Select * ...


2

The syntax is cumbersome, but there are a couple things you can do. If you don't care about the message returned by the first keyword, you can use Run keyword and return status. This is perhaps the easiest solution, since the keyword will return either True or False. ${status}= Run keyword and return status ... Page should contain element id=...


2

Selenium2Library has a keyword named Get Matching XPath Count which can return the number of items that match an xpath. The documentation even includes an example of counting items based on an id. It would look something like this: ${Count}= Get matching xpath count //div[@id='dashboard'] Along with that , can we make use of Comparison/Relational ...


2

You will find the answer here. For reference, in this case I would use the keyword "Get Element Attribute" and compare it against the expected result.


2

You can use the Selenium2Library Get Element Attribute keyword to get the style attribute: | | ${style}= | Get element attribute | id=check_style@style You can then either use a regular expression to find the background color attribute or do some additional parsing. The latter would be easier to do in python than with robot keywords. For example, if you ...


2

I think the plethora of anti-robot measures might indicate that Google does not want you to interact with it using robots, even if you are a Google Apps customer. From https://support.google.com/webmasters/answer/66357: Google's Terms of Service do not allow the sending of automated queries of any sort to our system without express permission in advance ...


2

Suppose you are expecting a particular locator to get value as "Payment was successful", so firstly store that in temp variable "response" and finds its value by "Get Text" and then compare it. ${response} Get Text xpath=/html/body/div/tr[2]/td/strong Should Be Equal As Strings ${response} Payment was successful


2

I have solved the problem by updating my chromedriver to 2.23. If anyone facing such issue then make sure you have updated version of browser and driver.


2

No, reason being Different OS works differently. The way we copy and paste things in MAC differs from Windows. Secondly the way MAC OS supports java also differs from windows. so we need different code for different OS.


2

"StaleElementReferenceException" is throw when the webelement is no longer available(deleted) or modified from the DOM. This can happen due to page or a part of it has refreshed due to AJAX, Javascript, etc. To handle this exception you will have to re-intialize the webelement for which you are getting the exception. You can also try to use "try catch" to ...


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