Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8391013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:08:51+00:00 2026-06-09T19:08:51+00:00

I am working on creation of automated test for some Web Application. This application

  • 0

I am working on creation of automated test for some Web Application. This application is very complex. In fact it is text editor for specific content. As a part of functionality it has some pop-up frames. You may open this pop-up? make some changes and save them – closing current frame. May problem is in that fact, that close button situated inside frame will be eliminating. And this force Chrome WebDriver to hung. My first try was like this:

    driver.findElement(By.xpath("//input[@id='insert']")).click();
    driver.switchTo().defaultContent();

But it hungs on first line after executinh click command as this command close frame.
Then I change to this(I have JQuery on the page):

    driver.executeScript("$(\"input#insert\").click()");
    driver.switchTo().defaultContent();

But this leads to same result.
Then I use this solution:

    driver.executeScript("setTimeout(function(){$(\"input#insert\").click()}, 10)");
    driver.switchTo().defaultContent();

And it hungs on second line. Only this solution works:

    driver.executeScript("setTimeout(function(){$(\"input#insert\").click()}, 100)");
    driver.switchTo().defaultContent();

but only if you don’t take into account, that it is unstable – some timing issue may occur.

So may question is there more cleaner and more stable way for switch out from closed frame?

P.S.: executeScript – self defined function to decrease amount of code. It simply executer some js on page.

Update:

I realized I was wrong. This problem is not for all iframes. It’s occur when tinyMCE popup used. Situation is exactly like in this topic. So it’s doubtful I will find answer here, but who knows. Solution described above will help, but only for very short amount of time, meaning that after several seconds pass chromedriver will hangs on next command.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:08:53+00:00Added an answer on June 9, 2026 at 7:08 pm

    Problem was in this line of tinyMCEPopup code:

       DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
    

    Executing this script on page fix hang problem(but possibly creates leaks 🙂 ):

    (function() {
    var domVar;
    if (window.tinymce && window.tinymce.DOM) {
        domVar = window.tinymce.DOM 
    }
    else if (window.tinyMCE && window.tinyMCE.DOM) {
        domVar = window.tinyMCE.DOM 
    }
    else {
        return;
    }
    var tempVar = domVar.setAttrib;console.log(123)
    domVar.setAttrib = function(id, attr, val) {
        if (attr == 'src' && typeof(val)== 'string' &&(val + "").trim().match(/javascript\s*:\s*("\s*"|'\s*')/)) {
            console.log("Cool");
            return;
        }
        else {
            tempVar.apply(this, arguments);
        }
    }
    
    }());
    

    Bug and solution also described here
    Note. Code above should be added to parent frame, not into popup frame.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working in the creation of some custom components adding functionalites to the
Am working on a project where i require some packet creation, such as ICMP
i am working in asp.net mvc 3 web application which uses razor code. and
I am currently working on the creation of an application for mobile devices with
I'm working on an Asp.Net 4.0 web application which is using the Membership and
I am working currently on creation of some tests on my app. I have
I'm working a course creation application, where the user needs to display all the
I have a working java web app for document management. On document creation i
I have just written a Word Document creation web application using .NET 3.5 which
I'm trying to create a DataGrid dynamically. Declarative creation is working fine: A source

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.