I have an iFrame in my code and calling a page in this iFrame. The page contains a video player which is stored in my public_html/video folder.
This page on it's own runs perfectly. When it calls into the iframe in IE9, I am getting a blank white page...
I used many types of X-UA, but nothing happens.
Any suggestions?
The page is rendered according to the topmost frame (the browser mode is set only once at the beginning and all values in nested frames are being ignored).
Related
I am trying to print ExtJs 4.2 panel.
This panel consists of several ExtJs grids in vbox layout.
The panel is rendered to a hidden div on fly.
In afterender listener of panel, a new window is created using window.open('') construct and the hidden div's innerHTML is written to the newly created window.document.
The newly created document is then closed and printed using regular window.print construct.
This arrangement works in the following scenarios:
In internet explorer, when the panel size is small and can be printed in a single page
In Chrome browser irrespective of the size of the panel
However as soon as panel grows based on the data stores attached to inner grids, IE prints only the last page and all pages prior to last page are printed as blank pages.
I have tried various IE specific CSS discussed on this forum and other techniques but nothing seems to work.
Any suggestions?
I am trying to automate a scenario where I would need to access elements inside an iFrame and continue my testing.
My current problem is that, I am able to switch to the iframe successfully, but I am unable to access contents inside the frame.
The contents inside the iframe are Shadow DOM contents and are inside a document.
The HTML code looks like this::(Please see attachedHTML)
I have tried the below and get
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element
By accessing the shadow root
driver.switchTo().frame("iframe_id");
WebElement root1 = driver.findElement(By.className("class_abs"));
WebElement shadowRoot1 = expandRootElement(root1);
Here webdriver is unable to find element by classname.
2.By using Javascript executor
driver.switchTo().frame("iframe_id");
JavascriptExecutor js=(JavascriptExecutor) driver;
js.executeScript("arguments[0].click();", driver.findElement(By.xpath("button_xpath")));
Here webdriver is unable to access the Xpath.
3.
Using normal Xpath after switching to IFrame.
I would like to know if I need to access the contents of the document inside iFrame first to access its elements. If that is the case, how can I do it.
P.S- Tried this on both chrome and Firefox browser.
All,
I have finally managed to resolve the issue.
So the issue resolutions goes like this.
-The frame designed on the page were actually hidden.
-I had to switch to the hidden frame after switching to the main frame.
-Then the elements were then identified easily.
Problems what I faced:
1. In Firefox browser-The hidden frame was not detected in the 'Firefinder' when I checked with filter 'frame' which was detecting all the frames except the hidden frame. Same was the case with 'Firepath'
2. In Chrome browser- Though the document inside the main frame was displayed, traversing inside did not show the hidden iframe.
Solution:
In Firefox browser, inspecting the element using the HTML tab helped me to identify the hidden frame inside the main frame.
Carefully traversing the iframe hidden document helped me.
But, I am still not sure why the Chrome browser 'Inspect' doesn't show this frame.
I have a Flex HTML component that is displaying content from a remote URL and a button in the Flex application that reloads the content. However, it takes a few seconds for the IFrame's content to refresh. During this time, there is no obvious feedback to the user that any action is underway.
I would like to clear the contents of the IFrame, so there is immediate feedback after clicking refresh, and then load the remote URL again. Is there a way to do this?
I've tried setting the HTMLText property to "" and setting the IFrame location to "about:blank", and neither of these have the desired immediate effect. (on it's own, setting the location to about:blank immediately clears the IFrame, but if it is followed by resetting the location to the original URL, the immediate clearing doesn't occur. Is this something to do with the IFrame caching the original page?)
One approach is to remove the component from the display list and add a new instantiated component back in its place.
This will assure fully initialized state.
One other way you could get around would be having a blank iframe or loading screen ready with the same size and same position, while the contents are being loaded, hide the content iframe, and show the blank iframe or loading screen. This could be much easier to achieve a more flexible result.
(Edited the question's focus due to some more investigation)
I have a simple page with a gridview inside an update panel. When I click the column header to sort, the postback fires and the sorting works, but a blank space appears at the top of the page, pushing everything down.
If I remove the UpdatePanel, things work fine and no blank space appears.
It doesn't happen in Firefox/Chrome, I only see the issue in IE 7 (or IE8/9 when Compatibility Mode is set to IE7 Standards).
So I'm wondering how to get around this, since users could still be using IE7 or have Compatibility mode on (quite a large and diverse user base on this system.) in a newer version of IE.
All I can see is that, on the async postback, this is added to the top of the form (first element in asp.net main form):
<DIV>
<INPUT id="ctl00_ScriptManager1_HiddenField" type="hidden" name="ctl00_ScriptManager1_HiddenField" value="" />
</DIV>
(IE tool is capitalizing)
I tried styling that input field but it didn't make a difference.
It's not a huge deal, but, if the UpdatePanel doesn't work properly, it makes me wonder what else will break in Compat Mode.
Thanks
This is old but to all who are interested... Set the rendering mode of the update panel to inline. This can happen when you have empty update panels.
I've run into a strange problem with an HTML form. I've built a dynamic table that adds a new row when you enter data into an existing blank row; because there are some server requirements in adding a row, I make an AJAX call to do this in the onblur event. It took a while to make this work for all browsers, but eventually all was happy with the world ... until IE8. Now, what happens is that, when the call returns from AJAX, the cursor shows in the next textbox (correctly), but the keyboard no longer works. I have to close the modal window (actually an IFRAME), then the keyboard starts to work again. If I put IE8 into compatibility mode, it works fine.
Has anybody seen behavior like this, or have any ideas for a workaround?
Thanks, Jim
I had problems with DIVs placed above an INPUT, that cloacked the cursor... and once the DIV was not above it, the cursor appeared back again.
Just an idea: Maybe your IFRAME captured the focus (and/or the keyboard).