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

switchToIframe() function is throwing an error starting from version 0.22.X (working fine on 0.20.5) #2956

Closed
ZeddEn opened this issue Oct 10, 2018 · 1 comment
Assignees
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug).

Comments

@ZeddEn
Copy link

ZeddEn commented Oct 10, 2018

Are you requesting a feature or reporting a bug?

Bug

What is the current behavior?

SwitchToIframe is triggering an error while it did not before on the previous versions. Was working fine on version 0.20.5 but the problem is detected started from the version 0.22.X.

Error message:
`2) Unhandled promise rejection:

       { type: 'uncaughtErrorOnPage',
  isTestCafeError: true,
  callsite:
  CallsiteRecord {
    filename: '/path/path/testTest.ts',
    lineNum: 99,
    callsiteFrameIdx: 6,
    stackFrames:
     [ [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       CallSite {},
       [Object],
       [Object],
       [Object],
       CallSite {} ],
    isV8Frames: true },
  errStack: 'TypeError: i.resolversMap[t.id] is not a function\n    at t.<anonymous> (http://localhost:1337/hammerhead.js:2:18945)\n    at
  t.e.emit (http://localhost:1337/hammerhead.js:10:6592)\n    at t._onMessage (http://localhost:1337/hammerhead.js:3:26593)\n    at n
  (http://localhost:1337/hammerhead.js:10:9156)\n    at n (http://localhost:1337/hammerhead.js:3:27716)\n    at
  http://localhost:1337/hammerhead.js:3:19488',
  pageDestUrl: 'http://xxxxxxxx/agency.html?ric=xxxxxxxx' }

         Browser: Chrome 69.0.3497 / Windows 10.0.0`

And
TypeError: i.resolversMap[t.id] is not a function at t.<anonymous> (http://localhost:1337/hammerhead.js:2:18945) at t.e.emit (http://localhost:1337/hammerhead.js:10:6592) at t._onMessage (http://localhost:1337/hammerhead.js:3:26593) at n (http://localhost:1337/hammerhead.js:10:9156) at n (http://localhost:1337/hammerhead.js:3:27716) at http://localhost:1337/hammerhead.js:3:19488

What is the expected behavior?

SwitchtoIframe should work and switch to the designed one

How would you reproduce the current behavior (if this is a bug)?

Just call the switchToIframe function

Provide the test code and the tested page URL (if applicable)

await t
.switchToIframe('#sas_52199 iframe')
.expect(Selector('img:not([src*="xxxxxxxx.com"])').exists).ok()
.switchToMainWindow();

Specify your

  • operating system: Windows 10
  • testcafe version: 0.22.1-alpha.3, 0.22.0 and 0.21.1
  • node.js version: v8.4.0
@LavrovArtem LavrovArtem self-assigned this Oct 10, 2018
@LavrovArtem LavrovArtem added TYPE: bug The described behavior is considered as wrong (bug). SYSTEM: hammerhead labels Oct 10, 2018
@LavrovArtem LavrovArtem added this to the Sprint #19 milestone Oct 10, 2018
LavrovArtem added a commit to LavrovArtem/testcafe-hammerhead that referenced this issue Oct 10, 2018
@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

2 participants