[Wtr-general] How to access a dynamic value from the source

Arti forum-watir-users at openqa.org
Mon Oct 16 09:25:55 EDT 2006


Thanks. This is what I did


[i]irb(main):021:0>[/i] pro_id_url = ie.link(:url, /fuseaction=photos/)

[i]irb(main):021:0>[/i] pro_id_url = pro_id_url .to_s
=> "type:         link\nid:           \nname:         \nvalue:        \ndisabled:     false\nhref:         http://domain.com/owners/index.cfm?fuseaction=photos&pro_id=21815\ninner text:   Edit French language ad\nimg src:      http://domain.com/vd/i/flag_FR.gif"

[i]irb(main):021:0>[/i] pro_id = /pro_id=<*>/.match(pro_id_url)
=> nil
[i]irb(main):022:0>[/i] puts pro_id
nil
[b]=> nil[/b]

Any suggestions? (I had to convert to string cos it was throwing up errors)

Thanks.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=4800&messageID=13275#13275


More information about the Wtr-general mailing list