Hi Alll

In my application when I click on a Link a Alert window opens having some
input text fields. Like name etc...
This pop up is opened as new window ,,,user could not close the browser
even if this window is present....

I have tried
String ParentWindowHandle = driver.getWindowHandle(); /*
*
(This is for
*
Parent Window Id)
*/
System.out.println(driver.getTitle()); /* (Parent window
title) */

driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
* (it will
open modal
* dialog
popup window)
*/
Set<String> availableWindows = driver.getWindowHandles();/*
*
(get all the
*
window
*
handles after
*
the modal
*
popup window
*
appears)
*/
System.out.println(availableWindows.size());
int Windows = 2;
if (availableWindows.size() == Windows) {
String popUpWindowHandle = null;
for (String popupwindow : availableWindows) {
//if (!availableWindows.equals(ParentWindowHandle))
popUpWindowHandle = popupwindow;
driver.switchTo().window(popUpWindowHandle);/*
*
(Switch to modal
*
dialog popup
*
window)
*/
System.out.println("pop up window title is "
+driver.getTitle()); /* (Verify modal dialog title) */


but my script does not run after
driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
* (it will
open modal
* dialog
popup window)
*/
it clicks on the link that opens a new alert pop up window ....and does not
run after this
driver.switchTo().window(popUpWindowHandle) does not switch to new
window.....

Please help....!!!

Thanks in Advance



--
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/-/fV1yugDKe3YJ.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Manoj Hans at Oct 1, 2012 at 9:18 am
    see this link ...

    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens having some
    input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the browser
    even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*
    *
    (This is for
    *
    Parent Window Id)
    */
    System.out.println(driver.getTitle()); /* (Parent window
    title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    * dialog
    popup window)
    */
    Set<String> availableWindows = driver.getWindowHandles();/*
    *
    (get all the
    *
    window
    *
    handles after
    *
    the modal
    *
    popup window
    *
    appears)
    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;
    driver.switchTo().window(popUpWindowHandle);/*
    *
    (Switch to modal
    *
    dialog popup
    *
    window)
    */
    System.out.println("pop up window title is "
    +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after
    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    * dialog
    popup window)
    */
    it clicks on the link that opens a new alert pop up window ....and does
    not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to new
    window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/WQu53JjX72EJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Manoj Hans at Oct 1, 2012 at 9:21 am
    Is this employment history popup or some other???



    On Monday, October 1, 2012 2:48:46 PM UTC+5:30, Manoj Hans wrote:

    see this link ...


    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens having some
    input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the browser
    even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*
    *
    (This is for
    *
    Parent Window Id)
    */
    System.out.println(driver.getTitle()); /* (Parent window
    title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    * dialog
    popup window)
    */
    Set<String> availableWindows =
    driver.getWindowHandles();/*

    * (get all the

    * window

    * handles after

    * the modal

    * popup window

    * appears)

    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if
    (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;
    driver.switchTo().window(popUpWindowHandle);/*
    *
    (Switch to modal
    *
    dialog popup
    *
    window)
    */
    System.out.println("pop up window title is "
    +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    * dialog
    popup window)
    */
    it clicks on the link that opens a new alert pop up window ....and does
    not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to new
    window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/3v2LtoZOylgJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • MonikaY at Oct 1, 2012 at 9:31 am
    yeah..employment history...:)
    On Monday, 1 October 2012 14:51:14 UTC+5:30, Manoj Hans wrote:

    Is this employment history popup or some other???



    On Monday, October 1, 2012 2:48:46 PM UTC+5:30, Manoj Hans wrote:

    see this link ...


    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens having
    some input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the browser
    even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*
    *
    (This is for
    *
    Parent Window Id)
    */
    System.out.println(driver.getTitle()); /* (Parent window
    title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    *
    dialog popup window)
    */
    Set<String> availableWindows =
    driver.getWindowHandles();/*

    * (get all the

    * window

    * handles after

    * the modal

    * popup window

    * appears)

    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if
    (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;
    driver.switchTo().window(popUpWindowHandle);/*
    *
    (Switch to modal
    *
    dialog popup
    *
    window)
    */
    System.out.println("pop up window title is "
    +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    *
    dialog popup window)
    */
    it clicks on the link that opens a new alert pop up window ....and does
    not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to new
    window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/wCAw1PlLGLYJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Manoj Hans at Oct 1, 2012 at 9:28 am
    see that link it will help u out.....:)


    On Monday, October 1, 2012 2:55:29 PM UTC+5:30, MonikaY wrote:


    yeah..employment history...:)
    On Monday, 1 October 2012 14:51:14 UTC+5:30, Manoj Hans wrote:

    Is this employment history popup or some other???



    On Monday, October 1, 2012 2:48:46 PM UTC+5:30, Manoj Hans wrote:

    see this link ...


    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens having
    some input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the browser
    even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*
    *
    (This is for
    *
    Parent Window Id)
    */
    System.out.println(driver.getTitle()); /* (Parent
    window title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    *
    dialog popup window)
    */
    Set<String> availableWindows =
    driver.getWindowHandles();/*

    * (get all the

    * window

    * handles after

    * the modal

    * popup window

    * appears)

    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if
    (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;
    driver.switchTo().window(popUpWindowHandle);/*
    *
    (Switch to modal
    *
    dialog popup
    *
    window)
    */
    System.out.println("pop up window title is "
    +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    *
    dialog popup window)
    */
    it clicks on the link that opens a new alert pop up window ....and does
    not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to new
    window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/ycKGBdUJqCoJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • MonikaY at Oct 1, 2012 at 9:32 am
    Hi Manoj Sir

    Now....when I am using

    ((JavascriptExecutor)driver).executeScript("window.showModalDialog =
    function( sURL,vArguments, sFeatures) { window.open(sURL, 'modal',
    sFeatures); }");

    It is showing "JavascriptExecutor cannot be resolved to a type"

    Sorry ...not having much knowledge about JS...Can u please tell what do I
    do to remove this error..?
    On Monday, 1 October 2012 14:55:29 UTC+5:30, MonikaY wrote:


    yeah..employment history...:)
    On Monday, 1 October 2012 14:51:14 UTC+5:30, Manoj Hans wrote:

    Is this employment history popup or some other???



    On Monday, October 1, 2012 2:48:46 PM UTC+5:30, Manoj Hans wrote:

    see this link ...


    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens having
    some input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the browser
    even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*
    *
    (This is for
    *
    Parent Window Id)
    */
    System.out.println(driver.getTitle()); /* (Parent
    window title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    *
    dialog popup window)
    */
    Set<String> availableWindows =
    driver.getWindowHandles();/*

    * (get all the

    * window

    * handles after

    * the modal

    * popup window

    * appears)

    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if
    (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;
    driver.switchTo().window(popUpWindowHandle);/*
    *
    (Switch to modal
    *
    dialog popup
    *
    window)
    */
    System.out.println("pop up window title is "
    +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    *
    dialog popup window)
    */
    it clicks on the link that opens a new alert pop up window ....and does
    not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to new
    window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/P5W30kLukyUJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Manoj Hans at Oct 1, 2012 at 9:41 am
    I m not sir....Please use only manoj...!!

    If u read completely that link then definitely u was able to do. but i
    think u just seen the last post.


    which IE driver u r using??




    On Monday, October 1, 2012 3:02:28 PM UTC+5:30, MonikaY wrote:

    Hi Manoj Sir

    Now....when I am using

    ((JavascriptExecutor)driver).executeScript("window.showModalDialog =
    function( sURL,vArguments, sFeatures) { window.open(sURL, 'modal',
    sFeatures); }");

    It is showing "JavascriptExecutor cannot be resolved to a type"

    Sorry ...not having much knowledge about JS...Can u please tell what do I
    do to remove this error..?
    On Monday, 1 October 2012 14:55:29 UTC+5:30, MonikaY wrote:


    yeah..employment history...:)
    On Monday, 1 October 2012 14:51:14 UTC+5:30, Manoj Hans wrote:

    Is this employment history popup or some other???



    On Monday, October 1, 2012 2:48:46 PM UTC+5:30, Manoj Hans wrote:

    see this link ...


    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens having
    some input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the
    browser even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*
    *
    (This is for
    *
    Parent Window Id)
    */
    System.out.println(driver.getTitle()); /* (Parent
    window title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    *
    dialog popup window)
    */
    Set<String> availableWindows =
    driver.getWindowHandles();/*

    * (get all the

    * window

    * handles after

    * the modal

    * popup window

    * appears)

    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if
    (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;
    driver.switchTo().window(popUpWindowHandle);/*
    *
    (Switch to modal
    *
    dialog popup
    *
    window)
    */
    System.out.println("pop up window title is "
    +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    * (it
    will open modal
    *
    dialog popup window)
    */
    it clicks on the link that opens a new alert pop up window ....and
    does not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to new
    window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/AAUNouX73v0J.
    For more options, visit https://groups.google.com/groups/opt_out.
  • MonikaY at Oct 1, 2012 at 9:47 am
    I am using Firefox.
    On Monday, 1 October 2012 15:11:27 UTC+5:30, Manoj Hans wrote:

    I m not sir....Please use only manoj...!!

    If u read completely that link then definitely u was able to do. but i
    think u just seen the last post.


    which IE driver u r using??




    On Monday, October 1, 2012 3:02:28 PM UTC+5:30, MonikaY wrote:

    Hi Manoj Sir

    Now....when I am using

    ((JavascriptExecutor)driver).executeScript("window.showModalDialog =
    function( sURL,vArguments, sFeatures) { window.open(sURL, 'modal',
    sFeatures); }");

    It is showing "JavascriptExecutor cannot be resolved to a type"

    Sorry ...not having much knowledge about JS...Can u please tell what do I
    do to remove this error..?
    On Monday, 1 October 2012 14:55:29 UTC+5:30, MonikaY wrote:


    yeah..employment history...:)
    On Monday, 1 October 2012 14:51:14 UTC+5:30, Manoj Hans wrote:

    Is this employment history popup or some other???



    On Monday, October 1, 2012 2:48:46 PM UTC+5:30, Manoj Hans wrote:

    see this link ...


    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens having
    some input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the
    browser even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*

    * (This is for

    * Parent Window Id)

    */
    System.out.println(driver.getTitle()); /* (Parent
    window title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    *
    (it will open modal
    *
    dialog popup window)
    */
    Set<String> availableWindows =
    driver.getWindowHandles();/*

    * (get all the

    * window

    * handles after

    * the modal

    * popup window

    * appears)

    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if
    (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;
    driver.switchTo().window(popUpWindowHandle);/*

    * (Switch to modal

    * dialog popup

    * window)

    */
    System.out.println("pop up window title is "
    +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    *
    (it will open modal
    *
    dialog popup window)
    */
    it clicks on the link that opens a new alert pop up window ....and
    does not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to new
    window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/NyijOTDQyGAJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Manoj Hans at Oct 1, 2012 at 10:03 am
    Add
    import org.openqa.selenium.JavascriptExecutor;
    On Monday, October 1, 2012 3:17:41 PM UTC+5:30, MonikaY wrote:


    I am using Firefox.
    On Monday, 1 October 2012 15:11:27 UTC+5:30, Manoj Hans wrote:

    I m not sir....Please use only manoj...!!

    If u read completely that link then definitely u was able to do. but i
    think u just seen the last post.


    which IE driver u r using??




    On Monday, October 1, 2012 3:02:28 PM UTC+5:30, MonikaY wrote:

    Hi Manoj Sir

    Now....when I am using

    ((JavascriptExecutor)driver).executeScript("window.showModalDialog =
    function( sURL,vArguments, sFeatures) { window.open(sURL, 'modal',
    sFeatures); }");

    It is showing "JavascriptExecutor cannot be resolved to a type"

    Sorry ...not having much knowledge about JS...Can u please tell what do
    I do to remove this error..?
    On Monday, 1 October 2012 14:55:29 UTC+5:30, MonikaY wrote:


    yeah..employment history...:)
    On Monday, 1 October 2012 14:51:14 UTC+5:30, Manoj Hans wrote:

    Is this employment history popup or some other???



    On Monday, October 1, 2012 2:48:46 PM UTC+5:30, Manoj Hans wrote:

    see this link ...


    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens having
    some input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the
    browser even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*

    * (This is for

    * Parent Window Id)

    */
    System.out.println(driver.getTitle()); /* (Parent
    window title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    *
    (it will open modal
    *
    dialog popup window)
    */
    Set<String> availableWindows =
    driver.getWindowHandles();/*

    * (get all the

    * window

    * handles after

    * the modal

    * popup window

    * appears)

    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if
    (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;

    driver.switchTo().window(popUpWindowHandle);/*

    * (Switch to modal

    * dialog popup

    * window)

    */
    System.out.println("pop up window title is "
    +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    *
    (it will open modal
    *
    dialog popup window)
    */
    it clicks on the link that opens a new alert pop up window ....and
    does not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to new
    window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/iL5WIlxpuTQJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • MonikaY at Oct 1, 2012 at 11:56 am
    I can fill the fields now ...But on clicking "Ok" button. The pop up does
    not go away......and the inserted data is not shown on parent window....
    When I manually click on "ok" button of webdriver's pop up ..then even it
    does not go.....
    In application it is working fine....I think is this because of JS we
    used.....
    how can I handle this ?
    On Monday, 1 October 2012 15:25:39 UTC+5:30, Manoj Hans wrote:

    Add
    import org.openqa.selenium.JavascriptExecutor;
    On Monday, October 1, 2012 3:17:41 PM UTC+5:30, MonikaY wrote:


    I am using Firefox.
    On Monday, 1 October 2012 15:11:27 UTC+5:30, Manoj Hans wrote:

    I m not sir....Please use only manoj...!!

    If u read completely that link then definitely u was able to do. but i
    think u just seen the last post.


    which IE driver u r using??




    On Monday, October 1, 2012 3:02:28 PM UTC+5:30, MonikaY wrote:

    Hi Manoj Sir

    Now....when I am using

    ((JavascriptExecutor)driver).executeScript("window.showModalDialog =
    function( sURL,vArguments, sFeatures) { window.open(sURL, 'modal',
    sFeatures); }");

    It is showing "JavascriptExecutor cannot be resolved to a type"

    Sorry ...not having much knowledge about JS...Can u please tell what do
    I do to remove this error..?
    On Monday, 1 October 2012 14:55:29 UTC+5:30, MonikaY wrote:


    yeah..employment history...:)
    On Monday, 1 October 2012 14:51:14 UTC+5:30, Manoj Hans wrote:

    Is this employment history popup or some other???



    On Monday, October 1, 2012 2:48:46 PM UTC+5:30, Manoj Hans wrote:

    see this link ...


    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens
    having some input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the
    browser even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*

    * (This is for

    * Parent Window Id)

    */
    System.out.println(driver.getTitle()); /* (Parent
    window title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    *
    (it will open modal
    *
    dialog popup window)
    */
    Set<String> availableWindows =
    driver.getWindowHandles();/*

    * (get all the

    * window

    * handles after

    * the modal

    * popup window

    * appears)

    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if
    (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;

    driver.switchTo().window(popUpWindowHandle);/*

    * (Switch to modal

    * dialog popup

    * window)

    */
    System.out.println("pop up window title is
    " +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    *
    (it will open modal
    *
    dialog popup window)
    */
    it clicks on the link that opens a new alert pop up window ....and
    does not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to new
    window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/DdtSQCT733kJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Manoj Hans at Oct 1, 2012 at 12:17 pm
    Sorry can't help u out...u have to wait until bug fixed or u can test it on
    IE driver.

    The same bug has resolved on IEDriverServer2.25.3
    Download IEDriver http://code.google.com/p/selenium/downloads/list


    --Manoj Hans
    On Monday, October 1, 2012 5:26:55 PM UTC+5:30, MonikaY wrote:

    I can fill the fields now ...But on clicking "Ok" button. The pop up does
    not go away......and the inserted data is not shown on parent window....
    When I manually click on "ok" button of webdriver's pop up ..then even it
    does not go.....
    In application it is working fine....I think is this because of JS we
    used.....
    how can I handle this ?
    On Monday, 1 October 2012 15:25:39 UTC+5:30, Manoj Hans wrote:

    Add
    import org.openqa.selenium.JavascriptExecutor;
    On Monday, October 1, 2012 3:17:41 PM UTC+5:30, MonikaY wrote:


    I am using Firefox.
    On Monday, 1 October 2012 15:11:27 UTC+5:30, Manoj Hans wrote:

    I m not sir....Please use only manoj...!!

    If u read completely that link then definitely u was able to do. but i
    think u just seen the last post.


    which IE driver u r using??




    On Monday, October 1, 2012 3:02:28 PM UTC+5:30, MonikaY wrote:

    Hi Manoj Sir

    Now....when I am using

    ((JavascriptExecutor)driver).executeScript("window.showModalDialog =
    function( sURL,vArguments, sFeatures) { window.open(sURL, 'modal',
    sFeatures); }");

    It is showing "JavascriptExecutor cannot be resolved to a type"

    Sorry ...not having much knowledge about JS...Can u please tell what
    do I do to remove this error..?
    On Monday, 1 October 2012 14:55:29 UTC+5:30, MonikaY wrote:


    yeah..employment history...:)
    On Monday, 1 October 2012 14:51:14 UTC+5:30, Manoj Hans wrote:

    Is this employment history popup or some other???



    On Monday, October 1, 2012 2:48:46 PM UTC+5:30, Manoj Hans wrote:

    see this link ...


    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens
    having some input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the
    browser even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*

    * (This is for

    * Parent Window Id)

    */
    System.out.println(driver.getTitle()); /* (Parent
    window title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    *
    (it will open modal
    *
    dialog popup window)
    */
    Set<String> availableWindows =
    driver.getWindowHandles();/*

    * (get all the

    * window

    * handles after

    * the modal

    * popup window

    * appears)

    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if
    (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;

    driver.switchTo().window(popUpWindowHandle);/*

    * (Switch to modal

    * dialog popup

    * window)

    */
    System.out.println("pop up window title is
    " +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*
    *
    (it will open modal
    *
    dialog popup window)
    */
    it clicks on the link that opens a new alert pop up window ....and
    does not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to new
    window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/KteeoYregBIJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • MonikaY at Oct 3, 2012 at 6:11 am
    awww..:(
    Anyways till then I am working on IE ......
    With IEDriverServer2.25.3...This is fine .......Thank you soo much Sir..:)
    On Monday, 1 October 2012 17:47:34 UTC+5:30, Manoj Hans wrote:

    Sorry can't help u out...u have to wait until bug fixed or u can test it
    on IE driver.

    The same bug has resolved on IEDriverServer2.25.3
    Download IEDriver http://code.google.com/p/selenium/downloads/list


    --Manoj Hans
    On Monday, October 1, 2012 5:26:55 PM UTC+5:30, MonikaY wrote:

    I can fill the fields now ...But on clicking "Ok" button. The pop up does
    not go away......and the inserted data is not shown on parent window....
    When I manually click on "ok" button of webdriver's pop up ..then even it
    does not go.....
    In application it is working fine....I think is this because of JS we
    used.....
    how can I handle this ?
    On Monday, 1 October 2012 15:25:39 UTC+5:30, Manoj Hans wrote:

    Add
    import org.openqa.selenium.JavascriptExecutor;
    On Monday, October 1, 2012 3:17:41 PM UTC+5:30, MonikaY wrote:


    I am using Firefox.
    On Monday, 1 October 2012 15:11:27 UTC+5:30, Manoj Hans wrote:

    I m not sir....Please use only manoj...!!

    If u read completely that link then definitely u was able to do. but i
    think u just seen the last post.


    which IE driver u r using??




    On Monday, October 1, 2012 3:02:28 PM UTC+5:30, MonikaY wrote:

    Hi Manoj Sir

    Now....when I am using

    ((JavascriptExecutor)driver).executeScript("window.showModalDialog =
    function( sURL,vArguments, sFeatures) { window.open(sURL, 'modal',
    sFeatures); }");

    It is showing "JavascriptExecutor cannot be resolved to a type"

    Sorry ...not having much knowledge about JS...Can u please tell what
    do I do to remove this error..?
    On Monday, 1 October 2012 14:55:29 UTC+5:30, MonikaY wrote:


    yeah..employment history...:)
    On Monday, 1 October 2012 14:51:14 UTC+5:30, Manoj Hans wrote:

    Is this employment history popup or some other???



    On Monday, October 1, 2012 2:48:46 PM UTC+5:30, Manoj Hans wrote:

    see this link ...


    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens
    having some input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the
    browser even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*

    * (This is for

    * Parent Window Id)

    */
    System.out.println(driver.getTitle()); /* (Parent
    window title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*

    * (it will open modal

    * dialog popup window)

    */
    Set<String> availableWindows =
    driver.getWindowHandles();/*

    * (get all the

    * window

    * handles after

    * the modal

    * popup window

    * appears)

    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if
    (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;

    driver.switchTo().window(popUpWindowHandle);/*

    * (Switch to modal

    * dialog popup

    * window)

    */
    System.out.println("pop up window title
    is " +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*

    * (it will open modal

    * dialog popup window)

    */
    it clicks on the link that opens a new alert pop up window
    ....and does not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to
    new window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/tTj7jZqY6qEJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Manoj Hans at Oct 3, 2012 at 6:30 am
    Glad to know that ur problem resolved...:)
    On Wednesday, October 3, 2012 11:41:51 AM UTC+5:30, MonikaY wrote:

    awww..:(
    Anyways till then I am working on IE ......
    With IEDriverServer2.25.3...This is fine .......Thank you soo much Sir..:)
    On Monday, 1 October 2012 17:47:34 UTC+5:30, Manoj Hans wrote:

    Sorry can't help u out...u have to wait until bug fixed or u can test it
    on IE driver.

    The same bug has resolved on IEDriverServer2.25.3
    Download IEDriver http://code.google.com/p/selenium/downloads/list


    --Manoj Hans
    On Monday, October 1, 2012 5:26:55 PM UTC+5:30, MonikaY wrote:

    I can fill the fields now ...But on clicking "Ok" button. The pop up
    does not go away......and the inserted data is not shown on parent
    window....
    When I manually click on "ok" button of webdriver's pop up ..then even
    it does not go.....
    In application it is working fine....I think is this because of JS we
    used.....
    how can I handle this ?
    On Monday, 1 October 2012 15:25:39 UTC+5:30, Manoj Hans wrote:

    Add
    import org.openqa.selenium.JavascriptExecutor;
    On Monday, October 1, 2012 3:17:41 PM UTC+5:30, MonikaY wrote:


    I am using Firefox.
    On Monday, 1 October 2012 15:11:27 UTC+5:30, Manoj Hans wrote:

    I m not sir....Please use only manoj...!!

    If u read completely that link then definitely u was able to do. but
    i think u just seen the last post.


    which IE driver u r using??




    On Monday, October 1, 2012 3:02:28 PM UTC+5:30, MonikaY wrote:

    Hi Manoj Sir

    Now....when I am using

    ((JavascriptExecutor)driver).executeScript("window.showModalDialog =
    function( sURL,vArguments, sFeatures) { window.open(sURL, 'modal',
    sFeatures); }");

    It is showing "JavascriptExecutor cannot be resolved to a type"

    Sorry ...not having much knowledge about JS...Can u please tell what
    do I do to remove this error..?
    On Monday, 1 October 2012 14:55:29 UTC+5:30, MonikaY wrote:


    yeah..employment history...:)
    On Monday, 1 October 2012 14:51:14 UTC+5:30, Manoj Hans wrote:

    Is this employment history popup or some other???



    On Monday, October 1, 2012 2:48:46 PM UTC+5:30, Manoj Hans wrote:

    see this link ...


    https://groups.google.com/forum/?fromgroups=#!searchin/webdriver/manoj$20hans/webdriver/4n68vqEl30Q/5WGT-W-yDSQJ



    --Manoj Hans
    On Monday, October 1, 2012 2:13:50 PM UTC+5:30, MonikaY wrote:

    Hi Alll

    In my application when I click on a Link a Alert window opens
    having some input text fields. Like name etc...
    This pop up is opened as new window ,,,user could not close the
    browser even if this window is present....

    I have tried
    String ParentWindowHandle = driver.getWindowHandle(); /*

    * (This is for

    * Parent Window Id)

    */
    System.out.println(driver.getTitle()); /*
    (Parent window title) */

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*

    * (it will open modal

    * dialog popup window)

    */
    Set<String> availableWindows =
    driver.getWindowHandles();/*

    * (get all the

    * window

    * handles after

    * the modal

    * popup window

    * appears)

    */
    System.out.println(availableWindows.size());
    int Windows = 2;
    if (availableWindows.size() == Windows) {
    String popUpWindowHandle = null;
    for (String popupwindow : availableWindows) {
    //if
    (!availableWindows.equals(ParentWindowHandle))
    popUpWindowHandle = popupwindow;

    driver.switchTo().window(popUpWindowHandle);/*

    * (Switch to modal

    * dialog popup

    * window)

    */
    System.out.println("pop up window title
    is " +driver.getTitle()); /* (Verify modal dialog title) */


    but my script does not run after

    driver.findElement(By.xpath("//div[6]//table[2]//td[2]/span/a")).click();/*

    * (it will open modal

    * dialog popup window)

    */
    it clicks on the link that opens a new alert pop up window
    ....and does not run after this
    driver.switchTo().window(popUpWindowHandle) does not switch to
    new window.....

    Please help....!!!

    Thanks in Advance

    --
    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/-/QI_I-RVUTcIJ.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedOct 1, '12 at 8:43a
activeOct 3, '12 at 6:30a
posts13
users2
websiteseleniumhq.org

2 users in discussion

Manoj Hans: 7 posts MonikaY: 6 posts

People

Translate

site design / logo © 2022 Grokbase