???ruby???????????????????д
???????????? ???????[ 2013/9/18 13:30:42 ] ????????
# encoding: utf-8
require 'rubygems'
require 'watir-webdriver'
module CWrap
def ???(obj)
obj.click rescue obj.class.to_s + '??????????е??'
end
def ???????()
self
end
alias :?? :???????
alias :?? :??
alias :??? :??
def ??(obj)
obj
end
def ???(obj)
obj.wait_until_present rescue puts('??' + obj.class.to_s + '??????????е??????')
end
def ???(obj)
obj.close rescue puts('?????????' + obj.class.to_s + '????')
end
def ????(text)
self.set text rescue puts('???' + self.class.to_s + '???????????????')
end
def ???(url)
self.goto url rescue puts(self.class.to_s + '??????????????????')
end
def ????(text)
self.include? text rescue puts self.class.to_s + '??????????а???????'
end
def ????(text)
puts text
end
end
include CWrap
????????? = Watir::Browser.new :firefox
?????????.??? 'www.google.com'
??(?????????.??.text_field(:name?? "q")).??.???? "qq"
??? ?????????.??.button(:name?? "btnG")
???(?????????.??.div(:id?? "resultStats"))
???? '???????' if ?????????.??.text.????('???QQ')
??? ?????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11