Category : protractor

I need to extract a text from the code snippet below (Using Protractor) <mat-chip> <div class="mat-chip-ripple"></div> "Text to print’ <mat-icon>cancel</mat-icon> </mat-chip> I want to my function to return ‘Text to print’ only. Doing a getText() on element gives me ‘Text to Print’ and ‘cancel’ too. Other options I tried was elem.getAttribute(‘innerHTML’) & ‘innerText’ – none ..

Read more

I have multiple automation scripts setup with NodeJS, Protractor, Jasmine Framework and SauceLabs. Each script is in separate .JS files and it reads data from .JSON files. I have defined login credentials and all other necessary data within the JSON files. multiCapabilities: [{ browserName: ‘chrome’, version: ‘latest’, platform: ‘Windows 8’, name: "tests", splitTestsBetweenCapabilities: true, acceptInsecureCerts: ..

Read more

When running the protractor script below let resultantArr = []; resultantArr = await browser.executeScript("var elements = document.querySelectorAll(‘ul[class=’wbs-droplist-container’][id*=’droplist’] li[class=’wbs-droplist-item’][id*=’droplistitem’]’) var arr = []; for (var i = 0; i < elements.length; i++) { arr.push(elements[i].innerText); } return arr;") return resultantArr; I’m getting Failed: javascript error: missing ) after argument list error. Please help me to solve this. ..

Read more

Could any add your inputs why Protractor e2e script faling after running first script successfully in bitbucket pipelines. Here is my config: image: trion/ng-cli-e2e:latest pipelines: branches: develop: custom: run-all-tests: – step: name: Run all tests caches: – nodecustom – yarn script: # run scripts – export ENVIRONMENT=qa – export SG_DESCRIPTION=$QA_SG_DESCRIPTION – export SG_GROUPID=$QA_SG_GROUPID – export ..

Read more

When I run my protractor scripts locally with the DefaultTimeOut set , They run successfully, However when I run them on bamboo, they fail with error: Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL Here is my config setup exports.config = { allScriptsTimeout: 50000, directConnect: true, //seleniumAddress: ‘http://localhost:9080/wd/hub’, framework: ‘jasmine’, jasmineNodeOpts: { defaultTimeoutInterval: ..

Read more

I have the following structure I want to query for some e2e angular test with protractor: <div id=’parentId’> <div>First</div> <div>Second</div> <div>Third</div> <div>Four</div> </div> Currently I want to retrieve a list of the texts of the child div elements : [‘First’,’Second’, ‘Third’, ‘Fourth’] I remember being able to do so with protractor in Angular some time ..

Read more

I have used restartBrowserBetweenTests: true in the config file. First test case executes properly and browser reopens after the first test and login to application. When it tries to open child window(on click of image link) i am getting Message:Failed: This driver instance does not have a valid session ID (did you call WebDriver.quit()?) and ..

Read more