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 3300918
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:42:14+00:00 2026-05-17T20:42:14+00:00

Hi basically I am trying to switch to a popup window then press a

  • 0

Hi basically I am trying to switch to a popup window then press a
button on that popup window but from somereaon I am getting erros.

Here is an example of the webpage

http://i42.photobucket.com/albums/e326/limpep/example.png

and here is my code

 for (String handle : driver.getWindowHandles()) {
                                 driver.switchTo().window(handle);

                               }


                       WebElement clicksa  =
driver.findElement(By.id("ButtonCancle"));
                           clicksa.sendKeys(Keys.ENTER);
                           driver.switchTo().defaultContent();

Errers that i am getting

    Exception in thread "AWT-EventQueue-0" org.openqa.selenium.NoSuchElementException: Unable to find element by id using "Accept Address" (7)
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_21'
Driver info: driver.version: ie
    at org.openqa.selenium.ie.ErrorHandler.verifyErrorCode(ErrorHandler.java:38)
    at org.openqa.selenium.ie.Finder.handleErrorCode(Finder.java:252)
    at org.openqa.selenium.ie.Finder.findElementById(Finder.java:126)
    at org.openqa.selenium.By$1.findElement(By.java:66)
    at org.openqa.selenium.ie.Finder.findElement(Finder.java:240)
    at org.openqa.selenium.ie.InternetExplorerDriver.findElement(InternetExplorerDriver.java:297)
    at com.capscanWebServers.CRMTesting$2.actionPerformed(CRMTesting.java:112)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

Kind Regards

  • 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-05-17T20:42:15+00:00Added an answer on May 17, 2026 at 8:42 pm

    First of all, you are probably not switching to the correct window. You are iterating all windows and switching to the first one which could be your main window.

    If the pop-up window is created by window.createPopup() then you will not be able to switch to it – such windows are not supported by Selenium 2. There’s some progress in implementing it – see http://code.google.com/p/selenium/issues/detail?id=27

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

Sidebar

Related Questions

Basically I am trying to restart a service from a php web page. Here
Basically, I am trying to use data from one model to trigger a switch
Basically I'm trying to accomplish the same thing that mailto:bgates@microsoft.com does in Internet Explorer
I'm currently trying to switch from Coda (a Mac IDE) to Vim. One thing
I'm basically trying to do this , but I don't know what T will
I am basically trying to retrieve some data from a MySql server, and display
I am basically trying to hide a DIV on the homepage but have it
I'm basically trying to figure out the simplest way to perform your basic insert
I'm basically trying to teach myself how to code and I want to follow
I recently came across this in some code - basically someone trying to create

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.