Ruben Zakarian
2008-Jun-03 00:41 UTC
Clicking on links within facebook iframes (facebook apps)
Hello, I have a problem with clicking on the links in facebook apps due to iframes. I am trying to write a little script to run through the funwall app. I used IE Dev toolbar to get the name of the id of the iframe (those iframes how no name attribute). So I run this command: $ie.frame(:id, "app2378983609_fb_frame").link(:text, ''View this post'').click And I get this: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/frame.rb:52:in `method_missing'': document (WIN32OLERuntimeError) OLE error code:80070005 in <Unknown> Access is denied. HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/frame.rb:52:in `document'' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/locator.rb:31:in `each_element'' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/locator.rb:40:in `locate'' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/container.rb:830:in `locate_tagged_element'' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/link.rb:24:in `locate'' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/element.rb:47:in `assert_exists'' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/element.rb:281:in `enabled?'' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/element.rb:53:in `assert_enabled'' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/element.rb:226:in `click!'' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/element.rb:212:in `click'' from C:/watir/FunwallPost.rb:28 Does anyone know how to get around this? Any help would be appreciated. Thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sorcerous
2008-Jun-03 02:31 UTC
Re: Clicking on links within facebook iframes (facebook apps)
Hi, Not sure if I understand your question. If you have a link inside an iframe in your facebook app and you want it to make your app go to another page, just add :target=>"_top" to your link_to call. You don''t need to name the iframe specifically. Vidal. On Jun 2, 5:41 pm, Ruben Zakarian <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hello, > > I have a problem with clicking on the links in facebook apps due to > iframes. I am trying to write a little script to run through the funwall > app. > > I used IE Dev toolbar to get the name of the id of the iframe (those > iframes how no name attribute). So I run this command: > > $ie.frame(:id, "app2378983609_fb_frame").link(:text, ''View this > post'').click > > And I get this: > > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/frame.rb:52:in > `method_missing'': document (WIN32OLERuntimeError) > OLE error code:80070005 in <Unknown> > Access is denied. > > HRESULT error code:0x80020009 > Exception occurred. from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/frame.rb:52:in > `document'' > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/locator.rb:31:in > `each_element'' > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/locator.rb:40:in > `locate'' > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/container.rb:830:in > `locate_tagged_element'' > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/link.rb:24:in > `locate'' > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/element.rb:47:in > `assert_exists'' > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/element.rb:281:in > `enabled?'' > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/element.rb:53:in > `assert_enabled'' > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/element.rb:226:in > `click!'' > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.4/./watir/element.rb:212:in > `click'' > from C:/watir/FunwallPost.rb:28 > > Does anyone know how to get around this? > > Any help would be appreciated. > Thanks. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---