# Do the basic watir initialization, then you should be able to get
away with something like this.
links = browser.links.to_a
links.select! {|link| link.href =~ /yp.kd.com/} # Omit all links to
different domains
puts Writing #{links.length} links to links.txt
# Write each link to the file
Hi guys
I was just testing out some scenarios with modal_dialog and everything
was working perfectly so I copied it over to my main script and
everything failed. The error that came up was:
C:/Ruby/lib/ruby/gems/1.8/gems/watir-2.0.2/lib/watir/modal_dialog.rb:
32:in `locate': undefined method
hi all:
I want to get values from excel,here is my code:
require 'watir'
require 'win32ole'
excel = WIN32OLE.new(excel.application)
excel.visible = true
filepath=D:\\test.xlsx
workbook=excel.workbooks.open(filepath)
worksheet=workbook.worksheets(Sheet1)
worksheet.Select
line=1
data = []
If I'm reading this correctly, your issue is that the line of code:
ie.form(:id,'commonLoginform').text_field(:name,
'username').set'$user'
is incorrectly setting the name of the variable ($user) and not
the value held in that variable. When you quoted $user it was
being defined as a String,
Hi Everyone,
Need help in figuring out how to click the link below with the given html :
tbodytr
td style=padding-bottom: 8px; class=loginStyle vAlign=bottom
width=120 align=rightCustomer ID:nbsp;/td
td style=padding-bottom: 6px; width=201
label
input id=userid
HTML is html. Webdriver should be the sameish
require 'rubygems'
require 'watir'
ie = Watir::IE.new ## KLP
ie.goto('http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/
index.jsp')
sleep 10
ie.frame(:name,'SearchFrame').text_field(:name,'searchWord').set('test')
Hi,
I have the following svg element in the page
table
div
svg
rect
rect
I want to access rect elements. I use element_by_xpath but i can only
access //table/div element. When I use //table/div/svg I get
error that elemt does not exists. Thought when I do
I don't think Watir does. Even watir-webdriver which supports a wider
set of HTML tags doesn't list svg or rect as a supported HTML tag.
http://rubydoc.info/gems/watir-webdriver/0.3.3/Watir/HTMLElement
Joe
On Sep 14, 9:41 am, al3kc aleks.kiev...@gmail.com wrote:
Hi,
I have the following svg
thanks,that's can work.
here is another problem in this code data = [] ,I must assign which
element i want to use,like data = [0] ,or do a loop
I have use the the Roo gem, that's really a good !
On 9月14日, 下午8时46分, joedio joe...@comcast.net wrote:
If I'm reading this correctly, your issue