Search Posts

Category: protractor

Each key must be a number of string; got undefined protractor

I am trying to read data from json file but I have some trouble. How can I get items from a json file to individual items? My json file: [ { “UserName”: “test@test.en”, “Password”: “tests123” } ] My method: element(by.name(‘username’)).sendKeys(browser.params.UserName); element(by.name(‘password’)).sendKeys(browser.params.Password); as a result i get Failed: each key must be a number of string; got undefined Source: AngularJS

browser.wait() does not work when there is no spinner in ProtratorJs Test

I am facing very weird behaviour of browser.wait(). In my test website sometime Spinner appear and sometime it does not appear to handle this situation I am using browser.wait(). But when there is no spinner appears in the page in that condition my code is not working and throwing exception. Can you please help me to resolve this issue. How I can make sure that if there is no spinner execution will continue if there […]

flow of functions in angular JS

I am new to protractor and angular js. I want to automate the test of web application using protractor and angular js. The web application has a login page followed by the main page that contains drop downs and input field. I have written the protractor code to do the test to login to the application. But after that It does not execute the function I wrote for the click on drop-down my question is […]