When does elementDetectionTimeout occur and how to handle it in selenium automation framework? - selenium-webdriver

I was going through a course on coursera regarding automation framework setup.There I came across "elementDetectionTimeout". I tried googling and didnt get exact help.
So, my question is, when does elementDetectionTimeout occur and how to handle it in selenium automation framework?

Related

Galen framework for automated responsive testing

I want to automate responsive testing of web page and as I was searching what would be the best solution I saw that a lot of answers were referring to Galen framework. I started to search for some tutorials, articles or code examples for this framework, but all the data I found was from 2013-2015, not newer, so I am afraid that it is a little bit outdated framework. Is anyone still using Galen framework for automating responsive testing, and if yes - would you recommend it?
If not - do you maybe have suggestion for some alternative that has more up to date documentation?

Can I reuse/call existing API in Selenium-Java Framework into the Protractor Framework?

Please bear with me if this is a silly question. But thought of getting an idea.
We have a very sophisticated Selenium Webdriver-Java framework. But now some parts of our application is being implemented in AngularJS. We would like to use protractor for test automation. But we have some API in the existing framework which we would like to reuse. Is there a possibility to do so or do we need to re-write all the existing API in protractor?
Thanks
Not probably the answer you are looking for. But, this can give you some hope.
Unfortunately there is no protractor java port at this moment. I use Selenium C# and my project started using some Angular recently. And, fortunately, there is a Protractor-net project done by some great people to accomplish same thing you are struggling with. I must say, if your project is big enough to leverage some time to write a java port for protractor you can follow this project easily. It's not that extensive. I am personally using it and started writing about this on my blog
Some one is trying to develop jProtractor - An angular/protractor implementation for Java Selenium API. https://github.com/caarlos0/jProtractor
This is still under development(not in a position to use yet), but this could be the right tool for people who are in similar situation as me.

RobotFramework vs Protractor for AngularJS Testing [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 8 years ago.
Improve this question
I am trying to finalize a tool for testing an AngularJS based web portal.
I have explored Protractor and was quite sure of using it for AngularJS tests until someone from the team came up with a suggestion of using Robot Framework.
So, Now I need to compare Protractor with Robot Framework.
Protractor has an advantage of having customizations available for AngularJS. However, I would agree that the learning curve is not too smooth because of the terminology and concepts (Promises and Control Flow) used.
Now I need to understand how good is Robot Framework for AngularJS testing. Is there anything one would miss regarding Protractor if switched to Robot Framework? Please provide your valuable inputs for the same.
Learning curve
IDEs available
Ease of automating AngularJS UI tests
Any other relevant points you feel are important!
Being in the middle of exactly such debate right now, I can tell you a few things:
AngularJS has a "loading" issue. Protractor solves that issue by giving you the function WaitForAngularToFinish. You get other things as well from Protractor such as ByRepeatNG
Automating UI by Robot Framework is done using Selenium 2, and the robot library doesn't contain Angular Specific code (WaitForAngularToFinish)
For now we're trying the Robot Framework way
We've solved the issue in Robot by tapping into the Java Library ngWebDriver
We've created a new robot library based on ngWebDriver with autowiring (to get the Selenium2 driver from the robot library) that gives the same functionality as Protractor.
Pros to going the robot way:
Robot Framwork gives you the ability to do everything, Not just UI. So you can prepare the test environment exactly like you want it (much harder to do in Protractor)
English. The ability to let non-coders write tests (We're using Gherkin notation).
Stability (everything about NPM for example, is inherently unstable)
Cons to going the robot way:
Harder for the Javascript people to write underlying code for the tests (since some of the underlying code will be in Java)
Simplicity
Regarding you other questions:
Learning Curve - easy on both Robot and Protractor
IDEs available - I'm using a plugin for IntelliJ for Robot Framework. The enterprise version of IntelliJ (which costs a lot of money) works quite well with Protractor as an IDE.
Ease of automating AngularJS UI tests - Once you have Angular keywords in Robot, you're good. Before that, very hard.
Robot Framework is quite lightweight and learning curve is quite fast from what I could see in the different places I used it. In terms of IDEs, there are plugin for most of them (I would not recommend using RIDE if you already have a favorite IDE).
To answer question 3) and 4) I would say that it all depends on your organisation and culture. If the end-2-end tests are going to be written by the Web App Angular developer, then probably better sticking with Protractor as this is all in the JavaScript ecosystem. But if you have a separate team of QA who is in charge of testing, they might indeed find some of the protractor/javascript to be complex/heavyweight for what they have to do. With QA that are a bit less hard-core-coder than developers, I find that Python is more appropriate and easy. And in that case, Robot Framework is a very good choice.

What are the differences between Selenium Webdriver and angular e2e and when should each be used?

I need to test an angular application and I'm thinking which testing framework to use.
Can someone please list the differences between those 2 testing framework, what is good / bad in each. when should each of them should be used? can the one replace the second?
Edit 1:
I'll try to focus my question. what I'm really interested in is the technical abilities of the 2 frameworks.
for example, some of the differences I have found:
selenium webdriver has the ability to run on grid in parallel on multiple machines, on the other side, angular scenarios runs much faster than selenium.
with selenium I can use keyboard keys such as Enter, Backspace and more and also do drag and drop actions.
selenium is not dependent on the app technology, angular is for angular apps only
Those are the type of differences I'm looking for - what can be done with one and can't be done with the other
thanks
Both should be used for testing an angular application. However, in my experience, they serve different purposes.
Angular e2e tests are your best friends when integrating new features into your application, or changing already existing features. They are there to make sure your application still behaves as expected if you are making changes to your code. These tests are much faster than selenium, do not need to be as in-depth, and, in my experience, are best executed before you push a new feature to your version control server.
Selenium tests should be used for regression testing. These tests should be far more in-depth than Angular e2e tests, and should be performed before pushing code into production.
UPDATE: This question may be less relevant now. As of January 2014, Angular plans to move from their own E2E suite to the protractor library for function tests, which use Selenium Webdriver.
If you're starting a new Angular project, you may want to look into using Protractor, as it is going to replace the current method of E2E Testing in the near future.
(Source: http://docs.angularjs.org/guide/dev_guide.e2e-testing)
I am struggling with this question as well.
Here is my thinking today:
1) Use Angular e2e testing for integration/regression testing the UI with mocks of your external dependencies (like the app server).
2) Use Selenium for integration/regression testing the complete system in a test/qa environment.
It seems Angular e2e testing helps fill in the gaps that unit testing leaves in testing view and controller logic that is tied to UI events. All of the Angular tests should mock external dependencies.
Selenium seems like the best fit for testing the entire system as the user will experience it.
This is such a subjective question, and therefore I'd first tell you to do some research. There is not much difference.
It is a very new project, whereas Selenium is a lot more mature. For instance, the JSON Wire Protocol that WebDriver is built on top of, is an actual W3C spec. This shows the project is very mature and very stable.
Due to the above, Selenium has a much much wider set of documentation, and a much wider community.
With Selenium you have a variety of different languages to use to code the tests in, as well as use the IDE. Angular limits use to pure JavaScript. For a lot of manual testers, this is a skill most do not have.
Both Selenium and Angular are open source, which (believe me) helps tremendously in debugging problems and understanding design decisions in their respective API's.

Automation Solution for both Web and WPF Applications

I wonder if someone has tackled the following challenge:
Automation Testing of a product which consist of both Web Application and WPF desktop application.
I'm looking for an automation solution which cover both under the same hood and technology.
for example: I thought of: Selenium + MS UI Automation libraries both under the same automation project by using C# and .NET.
is it possible? are there any other solutions for this type of product?
I know QTP might do it, but lack of good browser support - by far not as good as Selenium.
and also lack of solid programming language like JAVA or C#.
appreciate your help on this.
It is definitely possible to use Selenium (C#) with MS UI Automation. There would not be much in common besides code that you write yourself, but personally I think that this approach is a good idea if you are a strong programmer. MS UI Automation is not easy at all. An alternative would be to consider Silk4Net. You could use it for web and WCF, but if you wanted to use Selenium for web and Silk4Net for WCF, that would work. Just the plain ole Silk4Net 'library usuage' license is reasonably priced.

Resources