Updated e2e spec to remove warning

on
element(by.css(.phones li a)).click();

selenium will throw a warning message that more then one element found.

element.all(by.css('.phones li a')).first().click(); fixes the issue
This commit is contained in:
Vikram Soni
2014-07-13 12:38:51 +02:00
committed by Jeff Cross
parent 28c8199cd6
commit c280d5ab02

View File

@@ -73,7 +73,7 @@ __`test/e2e/scenarios.js`__:
it('should render phone specific links', function() {
var query = element(by.model('query'));
query.sendKeys('nexus');
element(by.css('.phones li a')).click();
element.all(by.css('.phones li a')).first().click();
browser.getLocationAbsUrl().then(function(url) {
expect(url.split('#')[1]).toBe('/phones/nexus-s');
});