Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webdriver error: TypeError options must be an object #1

Closed
letsmakesense opened this issue Jan 7, 2015 · 7 comments
Closed

webdriver error: TypeError options must be an object #1

letsmakesense opened this issue Jan 7, 2015 · 7 comments

Comments

@letsmakesense
Copy link

Thanks for your tool, first of all. It might be very helpful.

But when I tried to reproduce your example in the video on Ubuntu 14.04, I got the error: "There was a webdriver error: TypeError options must be an object".

Output of 'webdriver-manager' on startup:
"15:38:38.649 INFO - Java: Oracle Corporation 24.72-b04
15:38:38.649 INFO - OS: Linux 3.13.0-43-generic amd64
15:38:38.668 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
15:38:38.755 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: LINUX
15:38:38.789 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
15:38:38.790 INFO - Version Jetty/5.1.x
15:38:38.791 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
15:38:38.792 INFO - Started HttpContext[/selenium-server,/selenium-server]
15:38:38.792 INFO - Started HttpContext[/,/]
15:38:38.809 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@1a18b622
15:38:38.809 INFO - Started HttpContext[/wd,/wd]
15:38:38.816 INFO - Started SocketListener on 0.0.0.0:4444
15:38:38.817 INFO - Started org.openqa.jetty.jetty.Server@357b2b99
"

After opening the Protractor API page with elementor, duplicating the tab and activation 'Protractor' as a event listener, elementor produces the following output when selecting elements:
"> Testing locators { byCss:
{ nodeName: 'div',
class: 'container protractor-container ng-scope',
'ng-view': '',
autoscroll: 'true' } }
Testing locator list [ { name: 'byCss',
locator: 'by.css('div.container.protractor-container')',
countExpression: 'element.all(by.css('div.container.protractor-container')).count()' },
{ name: 'byCss',
locator: 'by.css('.container.protractor-container')',
countExpression: 'element.all(by.css('.container.protractor-container')).count()' },
{ name: 'byCss',
locator: 'by.css('div[ng-view=""]')',
countExpression: 'element.all(by.css('div[ng-view=""]')).count()' },
{ name: 'byCss',
locator: 'by.css('div[autoscroll="true"]')',
countExpression: 'element.all(by.css('div[autoscroll="true"]')).count()' } ]
Sending locator results { 'by.css('div.container.protractor-container')': 'There was a webdriver error: TypeError options must be an object',
'by.css('.container.protractor-container')': 'There was a webdriver error: TypeError options must be an object',
'by.css('div[ng-view=""]')': 'There was a webdriver error: TypeError options must be an object',
'by.css('div[autoscroll="true"]')': 'There was a webdriver error: TypeError options must be an object' }
"

What went wrong?

@andresdominguez
Copy link
Owner

Let me take a look. Which element did you click on? Did you go to http://angular.github.io/protractor/#/api?

Are both tabs pointing to the same url and are you using the second tab to open the developer tools?

@letsmakesense
Copy link
Author

Let me take a look. Which element did you click on? Did you go to
http://angular.github.io/protractor/#/api?

This is my output after starting elementor:

pedro@lms-dev:~$ elementor http://angular.github.io/protractor/#/api
util.puts: Use console.log instead
Type to see a list of locator strategies.
util.puts: Use console.log instead
Use the list helper function to find elements by strategy:
util.puts: Use console.log instead
e.g., list(by.binding('')) gets all bindings.
util.puts: Use console.log instead

util.puts: Use console.log instead
IMPORTANT:
util.puts: Use console.log instead
The element explorer will not work when the dev tools window is open on
the first tab of the launched chrome browser. To use the dev tools
duplicate the first tab and inspect on the second tab.
util.puts: Use console.log instead

util.puts: Use console.log instead
Getting page at: http://angular.github.io/protractor/#/api
Listening on port 13000

The API page opens, I duplicate the tab, open the developer tools on the
second tab, select Protractor under 'Event Listeners', click an element in
the source tree and get the following result:

Are both tabs pointing to the same url and are you using the second tab
to open the developer tools?

Yes


Reply to this email directly or view it on GitHub:
#1 (comment)

@andresdominguez
Copy link
Owner

I tried to reproduce the issue using my Linux box. This is my setup:

  • protractor 1.5.0 (for the webdriver manager)
  • elementor@0.0.10 (npm list -g | grep elementor)
  • node v0.10.33
  • Ubuntu 14.04

Can you check your node / protractor version? I will try to reproduce it with other versions.

image

@letsmakesense
Copy link
Author

My node version is 0.11.14. All other software is identical.

Am 07.01.2015, 18:25 Uhr, schrieb Andres Dominguez
notifications@github.com:

I tried to reproduce the issue using my Linux box. This is my setup:

  • protractor 1.5.0 (for the webdriver manager)
  • elementor@0.0.10 (npm list -g | grep elementor)
  • node v0.10.33
  • Ubuntu 14.04

Can you check your node / protractor version? I will try to reproduce it
with other versions.

image


Reply to this email directly or view it on GitHub:
#1 (comment)

@andresdominguez
Copy link
Owner

I was able to reproduce it with 0.11.14. I will try to fix it tonight.

@andresdominguez
Copy link
Owner

@letsmakesense Thank you for reporting the issue. Please update to 0.1.0.

@letsmakesense
Copy link
Author

Works with 0.1.0. Thanks a lot. The tool is a HUGE progress in writing e2e
tests with Protractor

Am 08.01.2015, 02:04 Uhr, schrieb Andres Dominguez
notifications@github.com:

@letsmakesense Thank you for reporting the issue. Please update to 0.1.0.


Reply to this email directly or view it on GitHub:
#1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant