We automate the web applications using the selenium webdriver with java or with language of choice. People might say that use protractor when the web application is built on angular application, that is bullshit.
We should go for Protractor only when your team does not have skill to handle the ajax & angular waits using fluent wait in selenium.
In similar manner, you can use the protractor to automate the non-angular application, just by setting
browser.ignoreSynchronization = true.
One more myth about automation, you should automate using the same language as development language. Please do aware that application development language does not have any effect on web browser, because web browser renders the only UI using HTML, CSS, JS.
So when you compare selenium & protractor based on application then you will not get justification to choose one tool.
When you are hiring people for automaton jobs, you should be getting more of java people but less of typescript people because people who know typescript tries to get job in development not in testing.
So you might get java people for automaton, instead of training them on protractor training them on waits in selenium, so that you could you selenium as your automation too.
Selenium support: java,python kotlin, c, c#, Php.
When we choose between selenium and protractor we also should mind about the unit testing framework that we are going to use.
Selenium supports many unit testing frameworks, TestNg and Junit are two important unit testing frameworks
Protractor Supports Jasmine and Mocha frameworks and also protractor woks well with chai assertions.
When we compare the TestNG and the Jasmine , TestNG wins as TestNg has below advantages over Jasmine:
Another obvious difference is the code length, we will be able to achieve the target in less number of lines in Java with selenium.
Code length is more because all of the fetch operation return promise, so you got to solve the promises first, so the code length is more.
Both selenium and protractor runs remote execution using the selenium server jar, so there is not much difference in the grid. The only change would be the configuration for the grid and choice of browser.
Comparing the performance selenium is faster than Protractor on the normal application but protractor is faster than selenium in angular application.
Protractor got inbuilt waits for angular and ajax calls, but we have to define the waits in selenium to handle angular and ajax.
protractor vs selenium speed is not comparable as their strategies are different.
I know this comparison should not be here but let's see this as well. Selenium IDE (SIDE) , is browser based to this will be installed an add-on to browser. W can use the SIDe for recording the actions an then perform it on the application. SIDE is not flexible as selenium Webdriver.
Protractor has no recording option but more flexible when compared with SIDE. SIDE support the non-angular apps in good way but not angular apps.
Protractor is a testing tool but Jasmine is unit testing framework. Jasmine performs the operations, Jasmine helps to structure those operation as test cases.
protractor supports all the nodejs based unit frameworks like Jasmine, Mocha, chai(assertion library), Karma(runner), here the karma is not bi***.
We can write the tests in Jasmine as like cucumber in a descriptive way, but Cucumber is a different kind when compared with Jasmine
Cucumber works based on the gherkin file descriptions, and it will have separate step_definitions.
We cannot use the combination of cucumber and Jasmine. These are the key differences between protractor and selenium
You can download the protractor vs selenium ppt by clicking
You can download the protractor vs selenium pdf by clicking