Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Could not find testability for element when use elementor or element explorer #3465

Closed
jalal1 opened this issue Aug 10, 2016 · 2 comments
Closed
Assignees

Comments

@jalal1
Copy link

jalal1 commented Aug 10, 2016

Hello,

I am trying to run elementor, in order to locate elements on my page. But i always got the same message :

ERROR: TypeError: Cannot create property 'stack' on string 'Error while waiting for Protractor to sync with the page: "Could not find testability for element."'

image

image

Same error when trying to using Element explorer.

image

Bug report

  • Node Version: 6.2.0
  • Protractor Version: 4.0.3
  • Browser(s): Chrome
  • Operating System and Version Windows 7
  • Your protractor configuration file
  • A relevant example test
  • Output from running the test
  • Steps to reproduce the bug
  • The URL you are running your tests against (if relevant)

Feature Request

  • Reasons for adopting new feature
  • Is this a breaking change? (How will this affect existing functionality)
@cnishina cnishina self-assigned this Sep 8, 2016
@cnishina cnishina added this to the 4.1.0 milestone Sep 8, 2016
cnishina added a commit to cnishina/protractor that referenced this issue Sep 9, 2016
cnishina added a commit to cnishina/protractor that referenced this issue Sep 9, 2016
- provide logging messages to useAllAngular2AppRoots
- provide logging messages to set the root element

closes angular#3465
@juliemr
Copy link
Member

juliemr commented Sep 13, 2016

I'm gonna be a stickler here - this isn't really a bug. The issue is that you're not giving element explorer enough information to tell how your angular application is set up. You can fix this by passing in a config, which has a rootElement property that is an element underneath your angular application.

But agreed that this behavior is difficult to understand - see comments in the linked issue. We're looking into simplifying.

@cnishina cnishina modified the milestones: Upcoming, 4.1.0 Sep 17, 2016
cnishina added a commit to cnishina/protractor that referenced this issue Sep 19, 2016
- Highlight elements by changing css
- Use the rootEl default 'body'. On second attempt, use a default rootEl ''.
  After the attempt is made, reset the rootEl.

closes angular#3465
cnishina added a commit to cnishina/protractor that referenced this issue Sep 19, 2016
- Highlight elements by changing css
- Use the rootEl default 'body'. On second attempt, use a default rootEl ''.
  After the attempt is made, reset the rootEl.

closes angular#3465
cnishina added a commit to cnishina/protractor that referenced this issue Sep 19, 2016
- Highlight elements by changing css
- Use the rootEl default 'body'. On second attempt, use a default rootEl ''.
  After the attempt is made, reset the rootEl.

closes angular#3465
cnishina added a commit to cnishina/protractor that referenced this issue Sep 19, 2016
- Highlight elements by changing css
- Use the rootEl default 'body'. On second attempt, use a default rootEl ''.
  After the attempt is made, reset the rootEl.

closes angular#3465
cnishina added a commit to cnishina/protractor that referenced this issue Sep 19, 2016
- Highlight elements by changing css
- Use the rootEl default 'body'. On second attempt, use a default rootEl ''.
  After the attempt is made, reset the rootEl.

closes angular#3465
cnishina added a commit to cnishina/protractor that referenced this issue Sep 19, 2016
- Highlight elements by changing css
- Use the rootEl default 'body'. On second attempt, use a default rootEl ''.
  After the attempt is made, reset the rootEl.

closes angular#3465
cnishina added a commit to cnishina/protractor that referenced this issue Sep 19, 2016
- Highlight elements by changing css
- Use the rootEl default 'body'. On second attempt, use a default rootEl ''.
  After the attempt is made, reset the rootEl.

closes angular#3465
cnishina added a commit to cnishina/protractor that referenced this issue Sep 19, 2016
- Highlight elements by changing css
- Use the rootEl default 'body'. On second attempt, use a default rootEl ''.
  After the attempt is made, reset the rootEl.

closes angular#3465
cnishina added a commit to cnishina/protractor that referenced this issue Sep 19, 2016
- Highlight elements by changing css
- Use the rootEl default 'body'. On second attempt, use a default rootEl ''.
  After the attempt is made, reset the rootEl.

closes angular#3465
@heathkit heathkit removed this from the 4.1.0 milestone Nov 9, 2016
@cnishina
Copy link
Member

Investigated: I also agree that more information should be passed to elementExplorer. For an Angular 2 app, the useAllAngular2AppRoots flag should be set in your Protractor config. Another way to do this is in the elementExplorer console to set browser.rootEl = '';.

Elementor does not allow you to pass in a config file so for Angular 2 apps, it appears that Elementor does not support it. It appears that there is already an issue for this in Elementor. andresdominguez/elementor#47

Since this is not an issue with Protractor, I'm going to close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants