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

Recorder does not change focus to popup window #283

Open
Aneshd opened this issue Oct 5, 2015 · 1 comment
Open

Recorder does not change focus to popup window #283

Aneshd opened this issue Oct 5, 2015 · 1 comment

Comments

@Aneshd
Copy link

Aneshd commented Oct 5, 2015

I am having an issue with the recorder not being able to change focus to a popup window .
I've included a simple html file that opens a new window,"MsgWindow", when a button is clicked.
My Selenium builder testcase is a follows:

{
  "type": "script",
  "seleniumVersion": "2",
  "formatVersion": 2,
  "steps": [
    {
      "type": "get",
      "url": "file:///C:/Users/Anesh/Documents/Selenium%20Builder/Seltest.html"
    },
    {
      "type": "clickElement",
      "locator": {
        "type": "css selector",
        "value": "button"
      }
    },
    {
      "type": "switchToWindow",
      "name": "MsgWindow"
    }
  ],
  "data": {
    "configs": {},
    "source": "none"
  },
  "inputs": [],
  "timeoutSeconds": 60
}

Html Document:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>Selenium Test</title>
    </head>
    <body>

<p>Click the button to create a window and then display the name of the new window.</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
    var myWindow = window.open("", "MsgWindow", "width=200, height=400");
    myWindow.document.write("<p>This window's name is: " + myWindow.name + "</p>");
    myWindow.document.write("<form action=\"action_page.php\">");
    myWindow.document.write("First name:<br>");
    myWindow.document.write("<input type=\"text\" name=\"firstname\" value=\"Mickey\">");
    myWindow.document.write("<br>");
    myWindow.document.write("Last name:<br>");
    myWindow.document.write("<input type=\"text\" name=\"lastname\" value=\"Mouse\">");
    myWindow.document.write("<br><br>");
    myWindow.document.write("<input type=\"submit\" value=\"Submit\">");
    myWindow.document.write("</form> ");
   }
</script>

    </body>
</html>

I am using
FF 41.0.1 ,Selenium Builder 2.3.5 and running a local test.
After the switchToWindow function is called , I attempt to record a new step below and recorder does not switch focus to the popup window.
I've included the Selenium builder testcase as well as the html document that is being tested.
Any help will be appreciated.

Thanks
Anesh

@ghost
Copy link

ghost commented Oct 18, 2017

The issue affects me also. No recognition of popups with FF 55.03 and SB 3. Is this supposed to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant