From dfd228497bd78e758b4068fb6b8738851d2e14d0 Mon Sep 17 00:00:00 2001 From: Vikram Soni Date: Sun, 13 Jul 2014 12:38:51 +0200 Subject: [PATCH] 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 --- docs/content/tutorial/step_06.ngdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/tutorial/step_06.ngdoc b/docs/content/tutorial/step_06.ngdoc index 5b509a8e..58a582e3 100644 --- a/docs/content/tutorial/step_06.ngdoc +++ b/docs/content/tutorial/step_06.ngdoc @@ -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'); });