How do I access an iframe from CasperJS?

Spent forever looking for this, and of course I found the answer minutes after posting the question. I can use the new frame switching commands added to phantomjs in this commit. Specifically, the this.page.switchToChildFrame(0) and this.page.switchToParentFrame() functions. It appears undocumented, and it also seems that the methods have been changed for upcoming releases, but it … Read more

How to pass parameters through iframe from parent html?

On the main page simply pass parameters as follows function myFunction(){ $(‘#myIframe’).attr(‘src’, “myIframeRequest.html?param1=value1&param2=value2”); } In Iframe You can use a script to get the desired parameter value from parameters passed to page. <script> function getParamValue(paramName) { var url = window.location.search.substring(1); //get rid of “?” in querystring var qArray = url.split(‘&’); //get key-value pairs for (var … Read more

HTML5 : Iframe No scrolling?

In HTML5 there is no scrolling attribute because “its function is better handled by CSS” see http://www.w3.org/TR/html5-diff/ for other changes. Well and the CSS solution: CSS solution: HTML4’s scrolling=”no” is kind of an alias of the CSS’s overflow: hidden, to do so it is important to set size attributes width/height: iframe.noScrolling{ width: 250px; /*or any … Read more

How do I dynamically change the content in an iframe using jquery?

<html> <head> <script type=”text/javascript” src=”https://stackoverflow.com/questions/1554396/jquery.js”></script> <script> $(document).ready(function(){ var locations = [“http://webPage1.com”, “http://webPage2.com”]; var len = locations.length; var iframe = $(‘#frame’); var i = 0; setInterval(function () { iframe.attr(‘src’, locations[++i % len]); }, 30000); }); </script> </head> <body> <iframe id=”frame”></iframe> </body> </html>

YouTube iframe embed – full screen

In the current YouTube iframe (2021), you have to add fullscreen to the allow attribute: <iframe allow=”fullscreen;”> If I understand correctly you have an iframe that contains a second iframe (the youtube one). Try adding the allowfullscreen attribute to the “parent” iframe. For full browser support it should look like this: <iframe src=”your_page_url” allowfullscreen=”allowfullscreen” mozallowfullscreen=”mozallowfullscreen” … Read more

How to send text to the Password field within https://mail.protonmail.com registration page?

To send a character sequence to the Password field as the the desired element outside of the <iframe> so you have to: switch_to_default_content(). Induce WebDriverWait for the desired element to be clickable. You can use the following Locator Strategies: Code Block: chrome_options = webdriver.ChromeOptions() chrome_options.add_argument(“start-maximized”) #chrome_options.add_argument(‘disable-infobars’) driver = webdriver.Chrome(options=chrome_options, executable_path=r’C:\Utility\BrowserDrivers\chromedriver.exe’) driver.get(“https://protonmail.com/”) WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, “//a[@class=”btn btn-default … Read more