Search Posts

Category: protractor

Need a expertise advise here regarding explicit wait in protractor for non angular apps

I noticed that it is hard to automate nonangular apps with a protractor. I am currently using these methods which I added it to current serenity click and enter functions to add the explicit wait. However, I would like to know if there is a thing I can add to the config file that will automatically wait for the dom to load before it starts to click any button or enter any text value? What […]

How to download a page using Protractor

I have automated a website. Automatically opening a website, clicking on a link then selecting dropdowns Distrct,Talaka and Village, then selecting radio then entering number in a textbox then clicking on button then a dropdown appears then selecting from dropdown and finally clicking on a button. A popup opens and an aspx page opens. Now I want to download the page which opens as pop-up. Kindly help me in the code. describe(‘angularjs homepage’, function() { […]

"Process exited with error code 1" This is the error message is displayed with code error : 1 when I run my below script

Failed: Error while waiting for Protractor to sync with the page: “both angularJS testability and angular testability are undefined. This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor’s bootstrapping. See http://git.io/v4gXM for details I am using page object model in the below code. but If I use a normal code it works fine. can you tell me where to correct this code. […]

How to select drop down list when object/value is always changeable in protractor

Anyone can help me how to call the drop down list for protractor? The highlighted object is not fixed value/object. Means it always changed. The below code is not working for me: element(by.model(‘residential’)).$(‘[value=”object:353″]’).click(); AngularJS as per below: <select class=”form-control ng-pristine ng-valid ng-not-empty ng-touched” ng-model=”residential” id=”ResidentStatus” ng-options=”status as status.Name for status in residentialStatus” style=””> <option value=”” class=”” selected=”selected”>Please Select Resident Status option label=”Malaysian” value=”object:353″>Malaysian</option> <option label=”Non-Malaysian” value=”object:354″>Non-Malaysian</option> </select> I hope someone can give an idea for […]

Different targets for end to end tests in protractor

How to run end to end test cases for Protractor for a angular workspace which has multiple applications. For example, here is the sample structure -/angularRootFolder -apps -First app -e2e -pageobjects -testcases -Second app -e2e -pageobjects -testcases How to define this in the root Protractor config file ? Any help would be greatly appreciated! I would want to run this setup in Jenkins instance too. Source: AngularJS

Finding difficulty in protractor automation for element inside ng-repeat having an order by condition

I got a dropdown implemented using ng-repeat with an orderBy condition. ng-repeat=”state in vm.states | orderBy : ‘state'” I am trying to implement this as: //Get Array elements from States dropdown and select a state. browser.findElement(state).click(); //this is where we click on dropdown to make drop down items visible. browser.findElements(by.repeater(‘state in vm.states’)).then(function (item1) { item1[2].click(); }); Also observed adding condition included in ng-repeat in our locator is resulting in syntax error which I feel is […]

Protractor: httpGet is not defined; Need Response codes from Hyperlinks

Problem: I am able to count the number of links on a page. I want to test if they are valid. While I could use .click -> this would validate a hyperlink thats a “404 Page Not Found” to Protractor. I want to use error code or response codes. There are several SO answers on this, but for some reason none of them work all based around two errors: Cant use the http get module […]

Unable to find elements from the table using protractor

Unable to locate the element in the table using protractor and bluebird promise concepts HTML page – using angular JS TFL712363160734TFLNo Plea Code used to search and return the prose value : this.searchIndex = function (myurn) { return(()=> { var my_table = element(by.css(“case-list-table tbody tr”)); var td = my_table.element(by.css(“td:first-child”)); element.all(td.each(function (element, index) { element.getText().then(function (text) { console.log(“outer” + text); console.log(index, text); if (text.matches(myurn)) { console.log(“Inner” + text); return promise.props({ index:index}); } }); }); }); }; […]

Next Page »