SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Apprentice
    Join Date
    Aug 2010
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Problem in identifying existing open webrowser

    Hi all,

    I am basically building sample web application using selenium ruby web driver.I have created two ruby files namely login.rb and logut.rb.

    Using login.rb I can successfully open the web browser.
    Now I need to click the exit button on the already opened browser using logout.rb.

    login.rb is working fine.But logout.rb is opening new IE instead of identifying the exiting opened page.

    Can you please help me in identifying the reference of opened page in logut.rb

    login.rblogin page opens)

    require 'selenium-webdriver'
    require 'rautomation'
    window = RAutomation::Window.new :title => "Windows Internet Explorer"
    wait = Selenium::WebDriver::Wait.new(:timeout => 60)
    driver = Selenium::WebDriver.for :ie
    driver.get "url"
    driver.get("javascript:document.getElementById('ov erridelink').click()")


    logout.rbCant get the instance of page opened by login.rb)

    require 'selenium-webdriver'
    require 'rautomation'
    window = RAutomation::Window.new :title => "Windows Internet Explorer"
    wait = Selenium::WebDriver::Wait.new(:timeout => 60)
    driver = Selenium::WebDriver.for :ie

    wait.until {
    driver.find_element(:link_text => "Exit").click

    window.button(:value => "&Yes").click

    }


    Regards,
    Avijit

  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: Problem in identifying existing open webrowser

    At this point, you can not control already opened browser using WebDriver.

 

 

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 11.11%
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 06:53 PM.

Copyright BetaSoft Inc.