Skip to content

[🐛 Bug]: CEF browser is not activating while switching to new window #14508

@fayizkc

Description

@fayizkc

What happened?

When I switching to new window of my CEF browser by using driver.switchTo().window(winHandle); switched window is running in the background. I tried with Action click, Javascript "window.focus();" method, but still no luck.

How can we reproduce the issue?

//Tried switching with below code,
driver.switchTo().window(winHandle);
Actions actions = new Actions(driver);
actions.moveToElement(driver.findElement(By.tagName("body"))).click().perform();
//or
JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;
jsExecutor.executeScript("window.focus();");

Relevant log output

First opened window is showing active until we close the driver

Operating System

Window 11

Selenium version

4.17.0

What are the browser(s) and version(s) where you see this issue?

CEF browser (Chrome driver ver. 118.0.5993.70)

What are the browser driver(s) and version(s) where you see this issue?

CEF browser (Chrome driver ver. 118.0.5993.70)

Are you using Selenium Grid?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-defectSomething is not working as intendedI-questionApplied to questions. Issues should be closed and send the user to community resources.J-issue-templateApplied to issues not following the template, or missing information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions