angularjs - Angular e2e testing. How to click dom elements ? (buttons links) -
this being done using angular 1.1.x
if there dom element doesnt have unique class or id how 1 supposed find in order element().click(); ?
is 1 use full version of jquery or there way angulars jquerylite ?
ie if 1 has list of links , how select first element of list using angular?
you can use generic jquery selectors find elements.. here's code e2e tests. note :eq(3) selector taking 4th anchor tag.
it('the cancel button should close form , revert info', function() { input("ci.customer.name").enter("tom selleck") element('#customerinfo input[value="cancel"]').click(); // check pdfdata make sure got reflected element('.navbar a:eq(3)').click(); expect(element('.navbar a:eq(2)').text()).not().tobe("customer (tom selleck)"); });
Comments
Post a Comment