SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Working with Multiple Pages. (Not Pop Up windows)

    Has any one used selenium to open a web page from a working page and doing some processing there and bringing control back to the main page. (NOT a pop up window but a web page.) like by clink a link on a page which opens another page. I fear Selenium doesn't support this.

  2. #2
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Working with Multiple Pages. (Not Pop Up windo

    I think my question is not clear. let me describe it little more -

    I have following link on a page -

    <a target="_blank" href="http://servicedesk:9090/" linkindex="10" set="yes">Service Desk</a>

    Hence in Selenium IDE it is recorded as -

    selenium.click("link=Service Desk");

    First thing is this would not be opened as pop up window but as a complete web page itself in browser as it is an entirely different application.

    Second the domain of resulting application is different from the one from where it is launched. (I think cross browser domains can be tested using experimental browser of selenium but I have not yet tried it.)

    Now when I launch the child application from the main application then child application is opened in a pop up window (I don't have any concern with this.)

    But then the eternal problem of identification of pop up window with selenium appears.

    I tried identifying the child window using these two methods -

    String [] winNames = selenium.getAllWindowNames();
    selenium.selectWindow(winNames[1]);

    and

    selenium.selectWindow("title=WindowTitle");

    but I always encounter following error -

    com.thoughtworks.selenium.SeleniumException: ERROR Server Exception: timed out waiting for window "" to appear

    I have always found selenium clunky when it comes to dealing with pop up windows !

  3. #3
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Working with Multiple Pages. (Not Pop Up windo

    Got it working now. My code is in java and looks as -

    selenium.click("link=Service Desk");
    Thread.sleep(5000);
    selenium.selectWindow("AdventNet ManageEngine ServiceDesk Plus");
    selenium.windowFocus();
    // Dealing with pop up window -
    selenium.type("username", "tbhadauria");
    selenium.type("password", "Password0");
    selenium.click("loginButton");
    selenium.waitForPageToLoad(MAX_WAIT_PERIOD);
    // Closing the pop up window.
    selenium.close();

    // Bringing control back to main window.
    selenium.selectWindow("");
    selenium.click("//td[3]/a/img");

    My only worry is with Thread.sleep(); statement as this test would still fail if pop up window doesn't turn up in the specified sleep time. Any better approach towards it.

  4. #4
    Member
    Join Date
    Oct 2005
    Location
    Bulgaria
    Posts
    48
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Working with Multiple Pages. (Not Pop Up windo

    Hi Tarun,

    I have one questions about the multiple windows.
    In your code you are selecting window with emty window locator.
    selenium.selectWindow("");
    is this correct? Do you know how to identify the wihdow locator.
    Thanks
    Lubo

  5. #5
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Working with Multiple Pages. (Not Pop Up windo

    Hello LT,

    This is from the API doc of Default Selenium for selectWindow method -

    ////
    if windowID is null, then it is assumed the user is referring to the original window instantiated by the browser)
    ////

    Hence Since I wanted to bring control back on main window I used - selenium.selectWindow("");

    API doc can be found at -

    http://release.openqa.org/selenium-remot...ava.lang.String,%20java.lang.String)

    Here you will find multiple ways to identify Window locater for select.Window method.

    Hope this helps.

  6. #6
    Junior Member
    Join Date
    Aug 2008
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Working with Multiple Pages. (Not Pop Up windo

    Tarun,

    In your initial post, you said that there were 2 problems: <ul type="square">[*]the result is in a new pop-up window[*]the new pop-up window is across domains[/list]

    From your code snippet, it's clear to me how you addressed the first problem, but not the second. Did you end up using the experimental Selenium browser that supposedly supports cross-domain browsing, or did you get this to work using "*iexplore"?

  7. #7
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Working with Multiple Pages. (Not Pop Up windo

    yes you are right I solved second problem using piiexplore browser.

  8. #8
    Apprentice
    Join Date
    Sep 2006
    Location
    Kerala, India
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Working with Multiple Pages. (Not Pop Up windo

    Tarun,

    Is there any training programs in SeleniumRC in Bangalore?

    We are using SeleniumIDE to create test suites and test cases for day to day web testing, but getting hard to configure with SeleniumRC.

    I think this will help us in browser compatibility testing and parametrisation.
    Quality is never an accident, it is the result of intelligent effort.

  9. #9
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Working with Multiple Pages. (Not Pop Up windo

    No Man,

    I have a document here for getting in configured with IntelliJ which can be found here -

    http://clearspace.openqa.org/docs/DOC-1200

    You can ask if you have any specific qs. Please raise that as a new thread.

  10. #10
    Senior Member
    Join Date
    Aug 2008
    Posts
    157
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Working with Multiple Pages. (Not Pop Up windo

    should i use multiwindow option for this?? while starting server?

    it is not selecting the window in my case

    selenium.selectWindow("Untitled - Processor");

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 9.38%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:26 AM.

Copyright BetaSoft Inc.