Re: Watir : Working in same session of IE



From: Anukul Singhal [mailto:anukul.singhal@xxxxxxxxx]
# Are you trying this out in Scite or is their something else
# that you are
# using?I believe when you execute (F5) the first two lines of code, it
# will open IE with google url.
# Now, with the google url already open, I want to update the
# code in such
# a way that I can enter the text in the search field without opening a
# new session of the browser. So, if I just add the 3rd line of my code
# and execute, it would definitely open a new instance of IE (since it
# will execute ie = Watir::IE.new again). I want to avoid that, hoping
# that there must be a logic between the first 2 lines and the 3rd line
# which avoids opening a new browser.

nope. scite will reexecute your code fr start.

try irb, it will execute your code per line you enter.


# Another idea would be to check if there is an existing instance of IE
# already present and then we can just do ie.goto(url).

never tried that. that would mean searching for an ie instance and then attaching an ole object on it. but i do not know the criteria since there could be many ie instances open and many google pages open. wc one then? but that would be cool though.

kind regards -botp


Relevant Pages

  • How to detect what is running Ruby program?
    ... I work on a Windows platform and have two utiltities that I can execute a ... The input commands such as "gets" do not work in the SciTE ... utility but do in the fxri utility. ... If I use a gets command in a program ...
    (comp.lang.ruby)
  • Re: Malware Triangle
    ... Ok, the capable browser says "Ooh look, a script tag! ... > ability to act as a container for non-html content, ... > that conglomeration is an html document, ... > execute the additional content contained within html documents they ...
    (alt.computer.security)
  • Re: Function execution before page reload
    ... if ){printf("Can't connect to MySQL Server. ... browser. ... Interaction between PHP and the browser is one-way - the PHP ... > In the short example above does the script execute the function BEFORE ...
    (comp.lang.php)
  • Re: Function execution before page reload
    ... browser. ... Interaction between PHP and the browser is one-way - the PHP ... > In the short example above does the script execute the function BEFORE ... The server receives information from the browser and sends html back to the ...
    (comp.lang.php)
  • Re: Function execution before page reload
    ... if ){printf("Can't connect to MySQL Server. ... browser. ... Interaction between PHP and the browser is one-way - the PHP ... loads the appropriate interpreter and calls it to execute the code. ...
    (comp.lang.php)