How can I save the current browser title to a variable?

D

Darin Duphorn

I'm new to Ruby, but I cannot find a way to get the browser title.

any help would be great.

Thanks
 
W

Wyatt Greene

I'm new to Ruby, but I cannot find a way to get the browser title.

any help would be great.

Thanks

This depends on the relationship between your Ruby code and the
browser.

One case is that your Ruby program is running along side the browser
on the same computer. This is the case with the watir gem, for
example. In this case, you can interact with Internet Explorer using
Ruby's Win32OLE library.

In the case of Ruby on Rails, your Ruby program is communicating with
a client browser via HTTP. In this case, you can have some client-
side JavaScript get the browser title and send the information as an
HTTP parameter to your Ruby on Rails program.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,282
Messages
2,571,404
Members
48,095
Latest member
WalkerBore

Latest Threads

Top