Hi team,

I have been trying to work a simple example for Jasmine data Provider with 
typescript. But I have been getting errors.
see below:

import { browser, by, element } from "protractor";

import Objects from "./features/testData.json";

let Objects = require('./features/testData.json');

describe("Jasmine Data Provider Demo Method 1", function () {
beforeAll(function () {
browser.get(Objects.testsiteurl);
console.log("Test site URL is : " + Objects.testsiteurl);
});

/* var objectDataProvider = {
{ firstname: Objects.userdetails.firstName1, lastname: 
Objects.userdetails.lastName1, postcode: Objects.userdetails.postcode1 },
{ firstname: Objects.userdetails.firstName2, lastname: 
Objects.userdetails.lastName2, postcode: Objects.userdetails.postcode2 }
};*/

function plusProvider1() {
{ firstname: Objects.userdetails.firstName1, lastname: 
Objects.userdetails.lastName1, postcode: Objects.userdetails.postcode1 },
{ firstname: Objects.userdetails.firstName2, lastname: 
Objects.userdetails.lastName2, postcode: Objects.userdetails.postcode2 }
}

it("Second test Case", function () {
console.log(Objects.userdetails.firstName)
element(by.xpath(Objects.locators.HomePage.btnbankManagerLogin)).click();
element(by.xpath(Objects.locators.HomePage.btnAddCustomer)).click();
});
using(plusProvider1, function (inputData) {
it('should calc with operator -', function () {

element(by.model("fName")).sendKeys(inputData.firstname);
element(by.model("lName")).sendKeys(inputData.lastname);
element(by.model("postCd")).sendKeys(inputData.postcode);
element(by.xpath("//button[@class='btn btn-default']")).click();
browser.sleep(3000);
browser.switchTo().alert().accept();
});
});
});

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/0b7500e1-93e3-4801-8e19-9182ee1df4c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to