Giter VIP home page Giter VIP logo

Comments (25)

andresdominguez avatar andresdominguez commented on July 23, 2024

Hello @sudha88

Protractor uses the developer tools to connect with chrome. When the devtools window is open protractor cannot issue commands.

If you want to use the developer tools you need to open a second tab pointing to the same URL as the first tab. Then open the devtools in the second tab.

from elementor.

sudha88 avatar sudha88 commented on July 23, 2024

Yes. I did that as you mentioned in your instructions but I was not able to see any locators. Can you think of any other reason?

Sent from my iPhone

On Mar 7, 2015, at 2:25 PM, Andres Dominguez [email protected] wrote:

Hello @sudha88

Protractor uses the developer tools to connect with chrome. When the devtools window is open protractor cannot issue commands.

If you want to use the developer tools you need to open a second tab pointing to the same URL as the first tab. Then open the devtools in the second tab.


Reply to this email directly or view it on GitHub.

from elementor.

andresdominguez avatar andresdominguez commented on July 23, 2024

Try to select a couple of nodes in the developer tools. The extension fires when you change the currently selected item. Do you see the log in the terminal moving?

Let me know if it works.

from elementor.

andresdominguez avatar andresdominguez commented on July 23, 2024

I have to board a plane. I will take a look at it tomorrow.

Can you tell me your node version?

from elementor.

sudha88 avatar sudha88 commented on July 23, 2024

node version v0.10.36

On Sat, Mar 7, 2015 at 3:13 PM, Andres Dominguez [email protected]
wrote:

I have to board a plane. I will take a look at it tomorrow.

Can you tell me your node version?


Reply to this email directly or view it on GitHub
#7 (comment)
.

Thanks,
Sudha

from elementor.

sudha88 avatar sudha88 commented on July 23, 2024

Hi Andres
I updated to protractor 1.8 and after that see some changes in protractor
logs in developer tools..I now see locators they are accompanied with
errors.Please see examples below.

  1. by.css('.action.clickable'): "There was a webdriver error: TypeError
    Invalid locator"
  2. by.css('div.action.clickable'): "There was a webdriver error:
    TypeError Invalid locator"
  3. by.css('div[ng-click="openGiftDialog()"]'): "There was a webdriver
    error: TypeError Invalid locator"
  4. by.css('div[ng-if="!giftSelected"]'): "There was a webdriver error:
    TypeError Invalid locator"

On Sat, Mar 7, 2015 at 10:30 PM, Sudha Menon [email protected] wrote:

node version v0.10.36

On Sat, Mar 7, 2015 at 3:13 PM, Andres Dominguez <[email protected]

wrote:

I have to board a plane. I will take a look at it tomorrow.

Can you tell me your node version?


Reply to this email directly or view it on GitHub
#7 (comment)
.

Thanks,
Sudha

Thanks,
Sudha

from elementor.

mick26 avatar mick26 commented on July 23, 2024

I am getting the exact same errors. Windows 7 32bit, Node v0.12.0,npm v2.51
Protractor v1.8.0 (installed globally only), Elementor v0.1.2

C:>elementor http://www.angularjs.org
Getting page at: http://www.angularjs.org
Listening on port 13000

Testing locators { byCss:
{ nodeName: 'div',
'app-run': 'hello.html',
class: 'well ng-scope' } }
Testing locator list [ { name: 'byCss',
locator: 'by.css('div[app-run="hello.html"]')',
countExpression: 'element.all(by.css('div[app-run="hello.html"]')).count()
' },
{ name: 'byCss',
locator: 'by.css('div.well')',
countExpression: 'element.all(by.css('div.well')).count()' },
{ name: 'byCss',
locator: 'by.css('.well')',
countExpression: 'element.all(by.css('.well')).count()' } ]
Sending locator results { 'by.css('div[app-run="hello.html"]')': 'There was a
webdriver error: TypeError Invalid locator',
'by.css('div.well')': 'There was a webdriver error: TypeError Invalid locato
r',
'by.css('.well')': 'There was a webdriver error: TypeError Invalid locator'
}
//========================================================
C:\Users\Mick>webdriver-manager start
seleniumProcess.pid: 3188
11:17:23.556 INFO - Launching a standalone server
Setting system property webdriver.chrome.driver to C:\Users\Mick\AppData\Roaming
\npm\node_modules\protractor\selenium\chromedriver.exe
11:17:23.796 INFO - Java: Oracle Corporation 25.20-b23
11:17:23.797 INFO - OS: Windows 7 6.1 x86
11:17:23.813 INFO - v2.45.0, with Core v2.45.0. Built from revision 5017cb8
11:17:24.009 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
11:17:24.011 INFO - Version Jetty/5.1.x
11:17:24.013 INFO - Started HttpContext[/selenium-server,/selenium-server]
11:17:24.201 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@c6a292
11:17:24.201 INFO - Started HttpContext[/wd,/wd]
11:17:24.201 INFO - Started HttpContext[/selenium-server/driver,/selenium-server
/driver]
11:17:24.202 INFO - Started HttpContext[/,/]
11:17:24.208 INFO - Started SocketListener on 0.0.0.0:4444
11:17:24.209 INFO - Started org.openqa.jetty.jetty.Server@11bc7ed
11:19:45.139 INFO - Executing: [new session: Capabilities [{browserName=chrome,
chromeOptions={args=[--load-extension=C:\Users\Mick\AppData\Roaming\npm\node_mod
ules\elementor\extension]}}]])
11:19:45.175 INFO - Creating a new session for Capabilities [{browserName=chrome
, chromeOptions={args=[--load-extension=C:\Users\Mick\AppData\Roaming\npm\node_m
odules\elementor\extension]}}]
Starting ChromeDriver 2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf) on
port 44940
Only local connections are allowed.
11:19:48.222 INFO - Done: [new session: Capabilities [{browserName=chrome, chrom
eOptions={args=[--load-extension=C:\Users\Mick\AppData\Roaming\npm\node_modules
elementor\extension]}}]]
11:19:48.426 INFO - Executing: [set script timeoutt: 11000])
11:19:48.597 INFO - Done: [set script timeoutt: 11000]
11:19:48.701 INFO - Executing: [get: http://www.angularjs.org])
11:19:57.441 INFO - Done: [get: http://www.angularjs.org]
11:20:36.950 INFO - Executing: [execute async script: try {

from elementor.

zivSher avatar zivSher commented on July 23, 2024

Hey,
just started using it.
great idea but I also get those:

'by.css('#searchInput')': 'There was a webdriver error: TypeError Invalid locator',
'by.css('input[autofocus=""]')': 'There was a webdriver error: TypeError Invalid locator',
'by.css('input.form-control')': 'There was a webdriver error: TypeError Invalid locator',
'by.css('.form-control')': 'There was a webdriver error: TypeError Invalid locator',
'by.css('input[type="search"]')': 'There was a webdriver error: TypeError Invalid locator',
'by.css('input[placeholder="Enter name"]')': 'There was a webdriver error: TypeError Invalid locator',
'by.css('input[ng-model="searchTerm"]')': 'There was a webdriver error: TypeError Invalid locator',
'by.id('searchInput')': 'There was a webdriver error: TypeError Invalid locator',
'by.model('searchTerm')': 1 }

from elementor.

andresdominguez avatar andresdominguez commented on July 23, 2024

I was finally able to reproduce the error. I haven't been able to find the cause, but I promise I will.

In the meantime, please use the github version:

$ git clone https://github.com/andresdominguez/elementor.git
$ ./elementor/bin/elementexplorer.js [url]

from elementor.

jusefb avatar jusefb commented on July 23, 2024

Hi,

I am still getting the error "There was a webdriver error: TypeError Invalid locator" even with the github version of elementor.

from elementor.

ch0wdan avatar ch0wdan commented on July 23, 2024

I also am seeing this issue on Mac - Node 0.10.32

Heres my console logs after trying to get element for both Elementor and webdriver manager.

Elementor Term:
Getting page at: https://angularjs.org
Listening on port 13000

Testing locators { byCss:
{ nodeName: 'a',
class: 'learn-link',
href: 'http://angular.codeschool.com' },
byLinkText: '\n \n Learn Angular in your browser for free!\n ' }
Testing locator list [ { name: 'byCss',
locator: 'by.css('a.learn-link')',
countExpression: 'element.all(by.css('a.learn-link')).count()' },
{ name: 'byCss',
locator: 'by.css('.learn-link')',
countExpression: 'element.all(by.css('.learn-link')).count()' },
{ name: 'byCss',
locator: 'by.css('a[href="http://angular.codeschool.com"]')',
countExpression: 'element.all(by.css('a[href="http://angular.codeschool.com"]')).count()' },
{ name: 'byLinkText',
locator: 'by.linkText('Learn Angular in your browser for free!')',
countExpression: 'element.all(by.linkText('Learn Angular in your browser for free!')).count()' } ]
Sending locator results { 'by.css('a.learn-link')': 'There was a webdriver error: TypeError Invalid locator',
'by.css('.learn-link')': 'There was a webdriver error: TypeError Invalid locator',
'by.css('a[href="http://angular.codeschool.com"]')': 'There was a webdriver error: TypeError Invalid locator',
'by.linkText('Learn Angular in your browser for free!')': 'There was a webdriver error: TypeError Invalid locator' }

WebDriver Term:
9:39:34.988 INFO - Done: [get: https://angularjs.org]
09:40:14.609 INFO - Executing: [execute async script: try { return (function (rootSelector, callback) {
var el = document.querySelector(rootSelector);

try {
if (!window.angular) {
throw new Error('angular could not be found on the window');
}
if (angular.getTestability) {
angular.getTestability(el).whenStable(callback);
} else {
if (!angular.element(el).injector()) {
throw new Error('root element (' + rootSelector + ') has no injector.' +
' this may mean it is not inside ng-app.');
}
angular.element(el).injector().get('$browser').
notifyWhenNoOutstandingRequests(callback);
}
} catch (err) {
callback(err.message);
}
}).apply(this, arguments); }
catch(e) { throw (e instanceof Error) ? e : new Error(e); }, [body]])
09:40:14.621 INFO - Done: [execute async script: try { return (function (rootSelector, callback) {
var el = document.querySelector(rootSelector);

try {
if (!window.angular) {
throw new Error('angular could not be found on the window');
}
if (angular.getTestability) {
angular.getTestability(el).whenStable(callback);
} else {
if (!angular.element(el).injector()) {
throw new Error('root element (' + rootSelector + ') has no injector.' +
' this may mean it is not inside ng-app.');
}
angular.element(el).injector().get('$browser').
notifyWhenNoOutstandingRequests(callback);
}
} catch (err) {
callback(err.message);
}
}).apply(this, arguments); }
catch(e) { throw (e instanceof Error) ? e : new Error(e); }, [body]]
09:40:14.631 INFO - Executing: [execute async script: try { return (function (rootSelector, callback) {
var el = document.querySelector(rootSelector);

try {
if (!window.angular) {
throw new Error('angular could not be found on the window');
}
if (angular.getTestability) {
angular.getTestability(el).whenStable(callback);
} else {
if (!angular.element(el).injector()) {
throw new Error('root element (' + rootSelector + ') has no injector.' +
' this may mean it is not inside ng-app.');
}
angular.element(el).injector().get('$browser').
notifyWhenNoOutstandingRequests(callback);
}
} catch (err) {
callback(err.message);
}
}).apply(this, arguments); }
catch(e) { throw (e instanceof Error) ? e : new Error(e); }, [body]])
09:40:14.639 INFO - Done: [execute async script: try { return (function (rootSelector, callback) {
var el = document.querySelector(rootSelector);

try {
if (!window.angular) {
throw new Error('angular could not be found on the window');
}
if (angular.getTestability) {
angular.getTestability(el).whenStable(callback);
} else {
if (!angular.element(el).injector()) {
throw new Error('root element (' + rootSelector + ') has no injector.' +
' this may mean it is not inside ng-app.');
}
angular.element(el).injector().get('$browser').
notifyWhenNoOutstandingRequests(callback);
}
} catch (err) {
callback(err.message);
}
}).apply(this, arguments); }
catch(e) { throw (e instanceof Error) ? e : new Error(e); }, [body]]
09:40:14.649 INFO - Executing: [execute async script: try { return (function (rootSelector, callback) {
var el = document.querySelector(rootSelector);

try {
if (!window.angular) {
throw new Error('angular could not be found on the window');
}
if (angular.getTestability) {
angular.getTestability(el).whenStable(callback);
} else {
if (!angular.element(el).injector()) {
throw new Error('root element (' + rootSelector + ') has no injector.' +
' this may mean it is not inside ng-app.');
}
angular.element(el).injector().get('$browser').
notifyWhenNoOutstandingRequests(callback);
}
} catch (err) {
callback(err.message);
}
}).apply(this, arguments); }
catch(e) { throw (e instanceof Error) ? e : new Error(e); }, [body]])
09:40:14.656 INFO - Done: [execute async script: try { return (function (rootSelector, callback) {
var el = document.querySelector(rootSelector);

try {
if (!window.angular) {
throw new Error('angular could not be found on the window');
}
if (angular.getTestability) {
angular.getTestability(el).whenStable(callback);
} else {
if (!angular.element(el).injector()) {
throw new Error('root element (' + rootSelector + ') has no injector.' +
' this may mean it is not inside ng-app.');
}
angular.element(el).injector().get('$browser').
notifyWhenNoOutstandingRequests(callback);
}
} catch (err) {
callback(err.message);
}
}).apply(this, arguments); }
catch(e) { throw (e instanceof Error) ? e : new Error(e); }, [body]]
09:40:14.667 INFO - Executing: [execute async script: try { return (function (rootSelector, callback) {
var el = document.querySelector(rootSelector);

try {
if (!window.angular) {
throw new Error('angular could not be found on the window');
}
if (angular.getTestability) {
angular.getTestability(el).whenStable(callback);
} else {
if (!angular.element(el).injector()) {
throw new Error('root element (' + rootSelector + ') has no injector.' +
' this may mean it is not inside ng-app.');
}
angular.element(el).injector().get('$browser').
notifyWhenNoOutstandingRequests(callback);
}
} catch (err) {
callback(err.message);
}
}).apply(this, arguments); }
catch(e) { throw (e instanceof Error) ? e : new Error(e); }, [body]])
09:40:14.675 INFO - Done: [execute async script: try { return (function (rootSelector, callback) {
var el = document.querySelector(rootSelector);

try {
if (!window.angular) {

from elementor.

codef0rmer avatar codef0rmer commented on July 23, 2024

Me too getting the same error.

from elementor.

ch0wdan avatar ch0wdan commented on July 23, 2024

On another note, this occurs also within the Webstorm Plugin. Users are not able to test directly inside webstorm

image

from elementor.

deonclem avatar deonclem commented on July 23, 2024

Same here, no matter what I try, I get the same result :
{ 'element.all(by.css('div')).count()': 'There was a webdriver error: TypeError Invalid locator' }

Mac - Node 0.10.31 - Protractor 1.6.1 - npm 1.4.23 - Elementor 0.1.8

from elementor.

andresdominguez avatar andresdominguez commented on July 23, 2024

Quick update:

I am working with the protractor team to fix this bug for good. The element explorer implementation changed after protractor 1.6.

Wait a few more days and I promise it will get fixed. I haven't forgotten.

Andres

from elementor.

deonclem avatar deonclem commented on July 23, 2024

Great !

from elementor.

ch0wdan avatar ch0wdan commented on July 23, 2024

Thanks! Looking forward to the update:)

Edit:

Any updates on this update??

from elementor.

Rleahy22 avatar Rleahy22 commented on July 23, 2024

+1

from elementor.

ch0wdan avatar ch0wdan commented on July 23, 2024

Any updates on this fix?

from elementor.

andresdominguez avatar andresdominguez commented on July 23, 2024

The protractor team already made the change I requested. I have it running on my machine.

I already migrated to the head version of protractor. The change didn't make it to protractor 2.0.0.

I have to figure out a way to ship a local protractor version with elementor until they release the next protractor version. It should be done this week.

from elementor.

andresdominguez avatar andresdominguez commented on July 23, 2024

I just pushed a new version to npm (1.0.4). It seems to be working. I will try to stress test it today to find bugs. The implementation is very different from the previous version, it may contain some bugs.

from elementor.

sudha88 avatar sudha88 commented on July 23, 2024

Thank you Andres .I will help test too.

On Tue, Mar 31, 2015 at 9:01 AM, Andres Dominguez [email protected]
wrote:

I just pushed a new version to npm (1.0.4). It seems to be working. I will
try to stress test it today to find bugs. The implementation is very
different from the previous version, it may contain some bugs.


Reply to this email directly or view it on GitHub
#7 (comment)
.

Thanks,
Sudha

from elementor.

ch0wdan avatar ch0wdan commented on July 23, 2024

Logging another issue that I'm seeing. Do we need to do anything besides update elementor (through npm) to get this to work?

from elementor.

bvasilchik avatar bvasilchik commented on July 23, 2024

I"m still on protractor 1.8 but I'm assuming since (1.0.4) you packaged it with it's own version of protractor that doesn't matter? I still get 'There was a webdriver error: TypeError Invalid locator' }

also I'm using the --nonAngular flag

from elementor.

andresdominguez avatar andresdominguez commented on July 23, 2024

This issue was fixed on version 1.0.7. Let me know if the problem persists.

from elementor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.