I am using java/junit to develop my tests and am using the
selenium-java-2.25.0 jars.
I am using IE8.

In my test I am clicking on a button which pop ups a new IE 8 Browser
Window to another page where I need to input some data.
So I think I am supposed to:
driver.switchTo().window(newHandle); //where the new handle is the pop IE
Browser which I am able to detect and determine which one
I then want to select an item in a select box: (Tried inputting waits, by
xpath, and by id)
Select selector = driver.findElement(By.xpath("some xpath")); //find select
box

The test than throws an exception stating it cannot find the xpath or id on
the line above..

Am I not supposed to be using the switchTo and be using something else?

I spoke with some Selenium User Group in house and they were stumped as
well.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/a9fZhrEmjecJ.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Mike Riley at Sep 16, 2012 at 5:02 am
    The switchTo is the correct thing to do, and if you aren't getting an
    exception I am guessing you are doing that right, unless you are switching
    to the same window you are in.

    Is it possible the new window uses frames? If so, you will need to switch
    to the correct frame after you switch to that window.

    Mike
    On Friday, September 14, 2012 11:57:14 AM UTC-7, Brian Keenan wrote:

    I am using java/junit to develop my tests and am using the
    selenium-java-2.25.0 jars.
    I am using IE8.

    In my test I am clicking on a button which pop ups a new IE 8 Browser
    Window to another page where I need to input some data.
    So I think I am supposed to:
    driver.switchTo().window(newHandle); //where the new handle is the pop IE
    Browser which I am able to detect and determine which one
    I then want to select an item in a select box: (Tried inputting waits, by
    xpath, and by id)
    Select selector = driver.findElement(By.xpath("some xpath")); //find
    select box

    The test than throws an exception stating it cannot find the xpath or id
    on the line above..

    Am I not supposed to be using the switchTo and be using something else?

    I spoke with some Selenium User Group in house and they were stumped as
    well.
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/AFzqDcB85k0J.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedSep 15, '12 at 9:41a
activeSep 16, '12 at 5:02a
posts2
users2
websiteseleniumhq.org

2 users in discussion

Brian Keenan: 1 post Mike Riley: 1 post

People

Translate

site design / logo © 2022 Grokbase