12

Handling the iframe with capybara ruby

 2 years ago
source link: https://www.codesd.com/item/handling-the-iframe-with-capybara-ruby.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Handling the iframe with capybara ruby

advertisements

Below is the html code ..

<iframe id="I0_1366100881331" frameborder="0" width="100%">
<div class="ZRa">
<span id="button" class="hAa Qo Bg" tabindex="0" role="button" title="" aria-      label="Click here to publicly +1 this." aria-pressed="false">
</div>
</iframe>

In the above scenario, I want to switch into the IFRAME (iframe id="I0_1366100881331") to perform some actions on the SPAN present in that IFRAME. I have tried with most of the cases but no result :(... any one please help.

I want the solution for cucumber using capybara ruby only..

Note: I tried with following code but no result.

page.driver.browser.switch_to.frame "I0_1366100881331"


within_frame(find('<css rule>')) do
  <code for dealing with iframe entries>
end

Related Articles

Attach the file with Capybara - The item is not currently visible and & gt; therefore can not interact with

I'm trying to attach file using Capybara. Input element is: <input type="file" multiple="multiple" name="uploadfile[]" style="position: absolute; margin: 0px 0px 0px -175px; padding: 0px; width: 220px; height: 30px; f

Click on the tracks in the iframe with Jquery

I'm trying to figure out a way of tracking clicks inside an iframe with jquery. The iframe is locate on the same domain but still I don't seem to be able to make this work, here's my code: <html> <head> <script type="text/javascript&qu

Loading the Iframe with the previous selected view

I have different anchor tags on my main view and also a popup div with an iframe. when clicked the anchor tags, different views are loaded to the iframe. My issue is when I click first anchor tag the iframe is loaded with a view which perfect. When I

jQuery / JavaScript - Loading the iframe with Ajax slows down the page

I'm loading a iframe with $.ajax(): $("#iframe_wrapper").each(function(){ $.ajax({ type: "post", url: "http://site.com", data: { action: 'get_the_iframe' }, context: this, success: function(html){ $(this).html(html); $(this).

Targeting the Iframe with form opens a new window

I am working in chrome v. 12. I have a jquery call which creates an iframe $(document).ready(function(){ $('<iframe />').appendTo('body').attr({'id': 'iframeUploader', 'name':'iframeUploader'}).hide(); }); when I use a form to upload, chrome opens a

Loading the iframe with a specified # element moves the parent viewpoint to the same location

I use this javascript to load a webpage that is scrolled to the area I need into an <iframe>. But whenever the given iframe loads, the viewport instantly jumps to that point, just like I used #asContainer at the end of the URL. HTML: <h3>Audio

How to simulate the sharing of the geolocation with Capybara?

My scenario calls for user giving permission for the app to user his location. This dialog looks different in every browser. How do I go about testing it with Capybara?I would mock/stub it if I needed it for the test suite flow and didn't want to cal

How has the iFrame with the preview of the header been done?

I know this is a general question, but I can't get a true answer on Stackoverflow or searching google. How do I make a page with a fixed header for logo and links and an iFrame of a given URL. The closest I've come across is this iFrame with Fixed He

Click on the links according to the identification with capybara

I have two rows in a table that each have a 'Preview' button that I want to test with Capybara, but I'm struggling figuring out how to click each preview button individually. I'm new to Capybara so I'm still learning. Here's what the table looks like

Firefox Retrieves the content of the iframe with the values ​​of the form elements

I have iframe with with form elements such as input, select textarea etc. I need to get whole iframe content with entered values to those elements. In IE 7,8 it work fine, but in FF I'm getting empty or default values instead. Here is code snippets:

How to handle the entry with the polymer, without the slit of the blue border?

Edit 2: Keypress events working, on this jsbin: http://jsbin.com/foyile/1/. The problem is, I need to focus the tab on the element, with these two pieces line of code ready: function() { this.tabIndex = 0; this.focus(); } The problem is this causes t

JS - height of the iframe with 100% and no scroll (Scroll-y in the body)

I have an iframe problem. firstly I search the keyword iframe height in https://stackoverflow.com/search?tab=relevance&q=iframe%20height but I did not find someone I need. How to make an iframe wicth height with 100% and no scroll. Scroll-y in body.

Access the scrolling event of the child's parental window inside the iframe with Jquery

I have a small javascript/jquery script on page1 (an aspx page) that scrolls an iframe loaded with page2 so that it stays with you on the page as you scroll up and down page1. However, when I load page1 inside an iframe for another parent page the sc

Spring MVC - handling the exception with @ExceptionHandler does not make the new view

I seem to be up against a limitation of Spring - I have a simple case to handle - I'm simulating an exception from a service method: @RequestMapping( method = RequestMethod.POST ) public String register( @RequestParam( "mail" ) String mail ){ th

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK