나는 특히 아래의 클릭 후, ptor.sleep()
전화를 많이 사용하거나 전혀 사용하지 않으려하는 초보자입니다. 아래 라인은 다음에 ptor.sleep(1000);
콜을 포함하지 않는 한 결코 값을 얻지 못합니다 (모두 Nan을 반환합니다).각도기 클릭 동작은 ptor.sleep()을 사용합니다. 어떻게 올바르게 해결할 수 있습니까?
클릭 한 후 함수의 클릭을 래핑 한 후에 목록의 결과를 해결하기 위해 배열 elem을 만들기 위해 여러 시도를했지만 수면 호출 없이는 아무 것도 시도하지 않았습니다. 각도기 제어 흐름을 이미 읽었습니다. 나는 ptor.sleep()
호출을 제거 할 수 있도록 어떤 통찰력
devCountString = parseInt(arr[i]);
덕분에, 어쩌면 내가 분명 뭔가 싶었어요.
내 스펙 : in the documentation를 같이 동작이 webdriver로 이동
describe('\n == patch List suite results == \n', function() {
// login already was done in config files, onPrepare function.
var ptor, noFilterCount;
// needed here if we turn ptor.ignoreSynchronization = false;
beforeEach(function() {
ptor = protractor.getInstance();
ptor.ignoreSynchronization = true;
browser.get('https://my.abc.com:3000/fixes');
ptor.sleep(1200);
}); //end beforeEach()
it('11 - verify filter fewer', function() {
var sevStringElm, sevString;
var applicableCount;
ptor.ignoreSynchronization = false;
ptor.sleep(500);
sevStringElm = element(by.css("input.form-control.bf-spinner"));
sevStringElm.clear();
ptor.sleep(500);
sevStringElm.sendKeys('8');
ptor.sleep(500);
// click on the "fewer" spinner, wrap the click to wrap the .
var fewerPromise = element(by.css("span.bf-spinner-toggle:nth-child(2)")).click();
ptor.sleep(1000);
// now get the list of clickable elements in each device card. by title
var applicableDevicesElm = element.all(by.css("[title$='Applicable\ Devices']"));
applicableDevicesElm.getText().then(function(arr) {
console.log("arr.length= "+arr.length);
for (var i = 0; i < arr.length; i++) {
devCountString = parseInt(arr[i]);
expect(devCountString).toBeLessThan(9);
};
});
});