E2e testing of angular signals with a protractor (interactive brake braking mechanisms)

I am studying protractor for e2e testing angularjs and have some development difficulties.

Since I am new to this environment, I follow some tutorials such as https://egghead.io/lessons/angularjs-protractor-interactive .

Looking through the tutorial, I see that it checks if the item was successfully found using * tabbing.

0:56 during the lesson, after he placed the element (by.tagName ("button")) and he supposedly tabs to see additional options available for the found button. he doesn’t tell you how he actually did it or whether he invests or not, but I assume that he puts a tab to check whether the newly found elements receive new available options

I also tried.

I made a button and an input field, as he did, and went into interactive mode.

element(by.tagName("button")).click() 

good for me. he pressed a button on index.html.

However, I can’t check if the item was found before clicking on it. This means that I do not see the click option when the tab is finished, when I finish typing on the point element (by.tagName ("button")).

a busy cat

there are more. Attempting to access the “click” option on the command line kills the command line and renders it unresponsive. I have to force to exit the command line and restart. (The picture I uploaded shows you unresponsive command requests if you do 'b.c' then tab.)

I found it was inefficient to restart the specifications, just to check if the item was found every time.

I would really appreciate it if someone let me know the correct solution to this problem.

Thanks.

+5
source share
1 answer

This was fixed 6 days ago and has not yet been released .

So, you can wait for Protractor> 1.3.1 or start using the main branch.

How to install a conveyor from a lead branch

If necessary, sudo and using Protractor globally:

 sudo npm -g install git://github.com/angular/protractor#master 

I prefer to configure the NodeJS project using package.json and point to a specific version of Protractor or commit for better control:

 npm init npm install --save git://github.com/angular/protractor#ed1c75c7 mkdir -p bin # some handy shortcuts ln -s ../node_modules/.bin/protractor bin/p ln -s ../node_modules/protractor/bin/elementexplorer.js bin/e # elementexplorer sample usage bin/e https://angularjs.org/ # Protractor binary sample usage bin/p your-config.js 
+1
source

Source: https://habr.com/ru/post/1204061/


All Articles