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

switchWindow , swithctopreviouswindow is giving error "cannot find specified action parameter / previous window not found" #5463

Closed
aprabh001c opened this issue Aug 26, 2020 · 10 comments
Assignees
Labels
FREQUENCY: level 2 TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@aprabh001c
Copy link

Scenario:

  1. Launch URL1 and do some actions through pageobject model classes to get URL2 in UI
  2. Launch URL2
  3. Switch to URL1 window
    Using await t.switchToWindow(firstWindow)

Getting ```1 Cannot find the window specified in the action parameters.

{
code: 'E74',
isTestCafeError: true,
callsite: CallsiteRecord {
filename: 'C:\Users\xxxx\Desktop\Tool\xxxxx.js',
lineNum: 76,
callsiteFrameIdx: 6,
stackFrames: [
[CallSite], [CallSite],
[CallSite], [CallSite],
[CallSite], [CallSite],
[CallSite], CallSite {},
[CallSite], [CallSite],
[CallSite], [CallSite]
],
isV8Frames: true
}
}

Tried using switchToPreviousWindow as well

Environment details:

  • testcafe version: 1.9
  • node.js version: 12.18.3
  • browser name and version: chrome
  • platform and version: windows 10
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Aug 26, 2020
@alexey-lin
Copy link
Contributor

Hi @aprabh001c,

Our attempts to replicate this issue based on your description were unsuccessful. Could you please share your test code so that we can reproduce and analyze the issue?

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Aug 27, 2020
@alexey-lin alexey-lin added the STATE: Need clarification An issue lacks information for further research. label Aug 27, 2020
@aprabh001c
Copy link
Author

aprabh001c commented Aug 28, 2020

Thanks for your response. I cannot share test code, but i am able to recreate this issue using a public website, please refer details below

"testcafe": "1.9.0",

Node - v12.18.3

Also: - It would be nice to have maximizeWindow action for await t.openWindow as well

import { t, Selector } from 'testcafe'

fixture`Switch_Window`

test(`Switch_Window`, async tn => {
    await t.navigateTo("https://www.verizon.com/").maximizeWindow()
    const big = await t.getCurrentWindow()
    const small = await t.openWindow("https://www.verizon.com/")
    await t.switchToWindow(big)
    await t.click(Selector('[aria-label="Shop Menu List"]').nth(1))
    await t.click(Selector('[href="/deals/"]'))
    await t.switchToWindow(small)
    await t.click(Selector('[aria-label="Shop Menu List"]').nth(1))
    await t.click(Selector('[href="/deals/"]'))
    await t.switchToWindow(big)
})

with Previous Window Step;::

test(`Switch_PreviousWindow`, async tn => {
    await t.navigateTo("https://www.verizon.com/").maximizeWindow()
    await t.openWindow("https://www.verizon.com/")
    await t.switchToPreviousWindow()
    await t.click(Selector('[aria-label="Shop Menu List"]').nth(1))
    await t.click(Selector('[href="/deals/"]'))
    await t.switchToPreviousWindow()
    await t.click(Selector('[aria-label="Shop Menu List"]').nth(1))
    await t.click(Selector('[href="/deals/"]'))
    await t.switchToPreviousWindow()
})

@no-response no-response bot removed the STATE: Need clarification An issue lacks information for further research. label Aug 28, 2020
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Aug 28, 2020
@Farfurix
Copy link
Contributor

@aprabh001c

Hello,

Thank you for the information. I reproduced the issue. Our team will examine it and check for a suitable solution.

For the team: if we remove all click actions, the test will pass.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Aug 31, 2020
@arunrajkuppusamy
Copy link

@Farfurix Any update on the above reported issue, i too face this same issue. I couldn't switch between windows.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Sep 9, 2020
@AlexSkorkin
Copy link
Collaborator

Once we get any results, we will share them here.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Sep 10, 2020
@rajeshmorla4
Copy link

Any update on this issue, even i am facing this issue when i try to switchwindows after performing click action.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Sep 15, 2020
@arubtsov
Copy link
Contributor

@rajeshmorla4

Hello,

Thank you for reaching out to us. No updates yet. We will update this thread as soon as we have any results.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Sep 17, 2020
@iamle0pard
Copy link

I wanted to add that I'm also seeing this using TestCafe 1.9.3 and Chrome 85.0.4183.121 (Official Build) (64-bit).

It appears that we can "typeText" on either window and continue to switch between them, but the moment either of them are clicked (.click(...)) then the switching between windows fails, just as @Farfurix pointed out.

I feel like it's worth emphasizing that the ability to click within either window is quite critical functionality to be able to run any useful end-to-end test scenario. I'm actually quite confused how some of the sample code provided in the advanced guide here and the sample blog here both contain click events, yet this clearly doesn't work. While I realize this is beta, it makes me wonder if this behavior used to work and broke shortly after being released or if it the click followed by switching windows ever did work at all.

@arubtsov Do you know if anyone is currently working on a fix for this? I see the tag "STATE: Need response" and so that is why I am asking (even though I see your response saying you will post once you have updates)

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Sep 25, 2020
@AlexKamaev
Copy link
Contributor

@iamle0pard Thank you for your input. We agree that everything should work correctly in this case. We haven't yet researched this issue. We will discuss it when planning the next development sprint. Perhaps we will decide to research this behavior.

The STATE: Need response tag is set by the bot for every non-contributor comment. It helps us remember to process customer feedback.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Sep 28, 2020
@AlexKamaev AlexKamaev self-assigned this Sep 28, 2020
@AlexKamaev AlexKamaev added this to the Sprint #66 milestone Sep 28, 2020
@AlexKamaev
Copy link
Contributor

#5597

AlexKamaev added a commit to AlexKamaev/testcafe that referenced this issue Oct 8, 2020
@AlexKamaev AlexKamaev added TYPE: bug The described behavior is considered as wrong (bug). and removed STATE: Need research labels Oct 13, 2020
@AlexKamaev AlexKamaev removed this from the Sprint #66 milestone Oct 13, 2020
@AlexKamaev AlexKamaev added this to the Sprint #67 milestone Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 2 TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

9 participants