Sha256: f1b2f3a5ebaa388afab0ed9fdd9e0506d200be98c6b59cad012f02498efb8a8f

Contents?: true

Size: 775 Bytes

Versions: 6

Compression:

Stored size: 775 Bytes

Contents

#---
# Excerpted from "Scripted GUI Testing With Ruby",
# published by The Pragmatic Bookshelf.
# Copyrights apply to this code. It may not be used to create training material, 
# courses, books, articles, and the like. Contact us if you are in doubt.
# We make no guarantees that this code is fit for any purpose. 
# Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
#---
require 'wet-winobj'
require 'winobjects/WinLabel'
require 'winobjects/WinCheckbox'
require 'winobjects/WinRadio'

include Wet::WinUtils
include Wet::Winobjects

system 'start "" "C:/Windows/System32/notepad.exe"'
sleep 1

w = app_window 'title' => 'Untitled - Notepad'

e = w.child_objects.first
e.set 'This is some text'
e.set 'And this is its replacement'
puts e.text

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
win_gui-0.1.6 book_code/windows/wobj.rb
win_gui-0.1.4 book_code/windows/wobj.rb
win_gui-0.1.3 book_code/windows/wobj.rb
win_gui-0.1.2 book_code/windows/wobj.rb
win_gui-0.1.1 book_code/windows/wobj.rb
win_gui-0.1.0 book_code/windows/wobj.rb