frames

Python Selenium (waiting for frame, element lookups)

二次信任 提交于 2019-11-28 11:39:24
I have these includes: from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.keys import Keys Browser set up via browser = webdriver.Firefox() browser.get(loginURL) However sometimes I do browser.switch_to_frame("nameofframe") And it won't work (sometimes it does, sometimes it doesn't). I am not sure if this is because Selenium isn't actually waiting for pages to load before it executes the rest of the code or what. Is there a way to force a webpage load? Because sometimes I'll do something like browser.find_element_by_name(

How can I get an element from within a frameset frame using JavaScript?

允我心安 提交于 2019-11-28 07:27:47
I need to access and element from within a frameset frame. For example if I have the following markup: <frameset rows="33%,33%,*"> <frame src="frame1.html"/> <frame src="frame2.html"/> <frame src="frame3.html"/> </frameset> How can I get some element from one of the child frames? I have tried this: window.frames[1].getElementById('someElementId') This results in a type error : getElementById() is not a function. Can someone assist? Thanks! You need to get the Document object for the frame. window.frames[1].document.getElementById('someElementId') Vinod <frameset rows="33%,33%,*"> <frame id=

How do i wait for a specific frame to load? I'm using selenium webdriver 2.24

怎甘沉沦 提交于 2019-11-28 07:12:22
问题 I used the webdriver backed selenium to wait for a specific frame to load. since in certain cases the switching to a specific frame fails because the frame hasn't loaded. The code I use is selenium.waitForFrameToLoad(frameJCLeft, strTimeOut); driver.switchTo().defaultContent(); driver.switchTo().frame(frameJCLeft); Please let me know if there's a method as I'm planning to eliminate selenium backed webdriver and only use the webdriver api 回答1: You can use Web Driver Wait and Expected Condition

Can't appendChild to a node created from another frame

扶醉桌前 提交于 2019-11-28 01:21:31
问题 I have a page with an iframe and would like to extract a DOM node from the child frame and put it on the parent page. This works in Firefox (3.5), but not in Internet Explorer (7). I've broken down the code to the simplest I can. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Fragment</title> </head> <body> <iframe src="blank.html"></iframe> <script type="text/javascript"> window.onload = function () { var

How to show real time filtered camera preview while recording videos?

ぐ巨炮叔叔 提交于 2019-11-27 22:28:12
问题 I want to show filtered camera preview while recording a video using media recorder. To filter the preview i need frames normally which i can get that from onPreviewFrame() function but while recording video with media recorder, onPreviewFrame() function does not get called. So what i want to know , is there any other ways to get these frames for filtering and then show them after modification ? I checked some apps from Google Play for example, Videocam Illusion. Its showing preview with

How are the facebook chat windows implemented?

北战南征 提交于 2019-11-27 13:15:44
On Facebook you can browse the site without affecting the floating chat windows. Seems like if the main page was inside an iFrame and the footer and chat windows where floating outside. (source: k-director.com ) Is the main content inside an iframe or are the footer and chat windows the ones inside an iframe? The later doesn't seem possible because int this case when you click in a link in the main page everything would have to reload, including the footer iframe. If you refresh the page the chat windows are reloaded, but if you browse the site by clicking links they are not. Thank you. If you

JQuery and frames - $(document).ready doesn't work

∥☆過路亽.° 提交于 2019-11-27 13:15:17
问题 I have a page, with some code in js and jQuery and it works very well. But unfortunately, all my site is very very old, and uses frames. So when I loaded my page inside a frame, $(document).ready() doesn't fire up. My frameset looks like: <frameset rows="79,*" frameBorder="1" frameSpacing="1" bordercolor="#5996BF" noresize> <frame name="header" src="Operations.aspx?main='Info.aspx'" marginwidth="0" marginheight="0" scrolling="no" noresize frameborder="0"> <frame name="main" src="Info.aspx"

Why Iframe dosen't work for yahoo.com

橙三吉。 提交于 2019-11-27 08:21:18
问题 I find this doesn't work: <iframe src="http://www.yahoo.com"> </iframe> I have read this question, but I don't understand what they mean by add: <?php header('X-Frame-Options: GOFORIT'); ?> I tried to add this to the top of my html file(change it to php file, of course), and my php file became: <?php header('X-Frame-Options: GOFORIT'); ?> <iframe src="http://www.yahoo.com"> </iframe> I run it in my appserv(with php 5.2.6), and it doesn't work. Could anybody explain what should I do exactly to

Detect failure to load contents of an iframe

无人久伴 提交于 2019-11-27 07:44:35
I can detect when the content of an iframe has loaded using the load event. Unfortunately, for my purposes, there are two problems with this: If there is an error loading the page (404/500, etc), the load event is never fired. If some images or other dependencies failed to load, the load event is fired as usual. Is there some way I can reliably determine if either of the above errors occurred? I'm writing a semi-web semi-desktop application based on Mozilla/XULRunner, so solutions that only work in Mozilla are welcome. splattne If you have control over the iframe page (and the pages are on the

Python Selenium (waiting for frame, element lookups)

时间秒杀一切 提交于 2019-11-27 06:20:06
问题 I have these includes: from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.keys import Keys Browser set up via browser = webdriver.Firefox() browser.get(loginURL) However sometimes I do browser.switch_to_frame("nameofframe") And it won't work (sometimes it does, sometimes it doesn't). I am not sure if this is because Selenium isn't actually waiting for pages to load before it executes the rest of the code or what. Is