开发者

Using Include? in Celerity Screen Scraping Script

I am using to Celerity to screen scrape a web page and I'm attempting to scrape all of the text elements within a particular div class. The following line of开发者_如何学Go code I'm using is throwing the following error: wrong argument type String (expected Module) (TypeError)

Code: puts browser.text if browser.frame(:id, 'bottomframe').div.class.include? 'ClassName'

Can anyone tell me what this error means or more importantly how to fix my line of code.


Further review of the Celerity documentation has provided a solution to my question.

Celerity provides the ability to use Regular Expressions to specify what you would like to find/match on the particular web page. For example: browser.link(:text, /ish/) means the first element that matches the regular expression /ish/.

Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜