Issue Details (XML | Word | Printable)

Key: SIDE-222
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Shinya Kasatani
Reporter: Andras Hatvani
Votes: 3
Watchers: 6
Operations

If you were logged in you would be able to see more operations.
Selenium IDE

Test execution is not possible in chrome mode in Firefox 3

Created: 09/May/08 03:35 AM   Updated: 18/Feb/09 12:51 AM   Resolved: 18/Feb/09 12:51 AM
Return to search
Component/s: None
Affects Version/s: 1.0-beta
Fix Version/s: 1.0

File Attachments: 1. Text File chrome-manifest.patch (0.2 kB) 27/Dec/08 11:01 PM - Jerry Qian

Environment: Windows XP/2003, Firefox 3.0b5


 Description  « Hide

[Scenario]
Open a Chrome URL like the following:
chrome://selenium-ide/content/selenium/TestRunner.html?test=file:///C:/Selenium/Development/TestSuite.html&baseURL=http://www.domain.com&userExtensionsURL=file:///C:/Selenium/Library/user-extensions.js

[Expected]
Upon loading the URL the contents of the first test case are displayed in the testFrame iframe

[Actual]
The testFrame iframe is empty and it won't be loaded with test content upon selecting other test cases neither

[Additional]
When clicking on a test case, then the content of it will be displayed in the testSuiteFrame and an exception is raised:
uncaught exception: unknown (can't convert to string)



Shinya Kasatani added a comment - 28/May/08 09:25 PM

Resolved in r453.
Also the URI of the TestRunner has been changed to make it work. Please change chrome://selenium-ide/ to chrome://selenium-ide-testrunner/ .


Shinya Kasatani made changes - 28/May/08 09:25 PM
Field Original Value New Value
Resolution Fixed [ 1 ]
Fix Version/s 1.0-beta2 [ 10581 ]
Status Open [ 1 ] Resolved [ 5 ]
Andras Hatvani added a comment - 02/Jun/08 04:18 PM

I've just took a look on it with a fresh build:
+ Test suite will be opened and correctly handled, i.e. tests will be executed

  • No style is visible, I guess that the css won't be included
  • multiWindow doesn't work (without pop-up blocker)

Environment: OS X 10.5.3, Firefox 3.0rc1


Andras Hatvani added a comment - 02/Jun/08 05:10 PM

Regarding multiWindow: Upon closing my browser tabs I discovered that the content of the first one has been replaced by the the initial content of an AUT window. This is not what Selenium expected (me neither), that's why I got a permission denied error. Unfortunately there was nothing in the log window.
After closing the first tab (whose content has been replaced) and twice reloading the Selenium test runner tab surprisingly the test was running; upon a reload again I got the permission denied error.


Shinya Kasatani added a comment - 03/Jun/08 12:41 AM

I see, there's security error when trying to load css files from chrome:// URL.


Shinya Kasatani made changes - 03/Jun/08 12:41 AM
Status Resolved [ 5 ] Reopened [ 4 ]
Resolution Fixed [ 1 ]
Shinya Kasatani added a comment - 03/Jun/08 12:45 AM

It seems pretty hard to fix this problem, so I'm postponing this.


Shinya Kasatani made changes - 03/Jun/08 12:45 AM
Priority Blocker [ 1 ] Major [ 3 ]
Fix Version/s 1.0-beta2 [ 10581 ]
Fix Version/s 1.0 [ 10551 ]
Dominique Quatravaux added a comment - 16/Sep/08 12:22 PM

Here is a workaround:

1. extract the selenium-test.css from the selenium-core distribution,
2. make it available someplace over http (local disk would probably work too, but I haven't tested this).
3. add the following to user-extensions.js (replace the URL after "styleLink.href = " with the one where you made the CSS available in step 2:

HtmlTestSuiteFrame.prototype._attachStylesheet = function() { var d = this.getDocument(); var head = d.getElementsByTagName('head').item(0); var styleLink = d.createElement("link"); styleLink.rel = "stylesheet"; styleLink.type = "text/css"; styleLink.href = "http://example.com/~fred/selenium-tests.css"; // Replace with actual URL, see above LOG.debug("styleLink.href="+styleLink.href); head.appendChild(styleLink); };

HtmlTestFrame.prototype._attachStylesheet =
HtmlTestSuiteFrame.prototype._attachStylesheet;

4. Clear browser cache, quit Firefox and restart it. You should get colors in your test tables now.


Andras Hatvani added a comment - 22/Oct/08 02:59 PM

There is a regression with the current revision 495 compared to r452, where the original problem has been solved: The same behavior as in the description is observable with the latest build.


Jerry Qian added a comment - 10/Nov/08 09:22 PM

I also encountered CSS issue on TestFrame with FF3 Chrome Mode. (FF2 works fine)
I use solution similar to Dominique's: attach stylesheet by absolute external CSS URL.
It works but what's the root cause for FF3? Can S-IDE fix it?

Another concern is FF3 must set Security.fileuri.strict_origin_policy = false for file system.
Can S-IDE auto config it?


Jerry Qian added a comment - 14/Dec/08 07:27 AM

I figure out the root cause for this CSS issue on FF3 Selenium Chrome TestRunner mode.

On my FF3 Error Console, I see error message:
Security Error: Content at (local test suite html address like file:///c:/seltest/testsuite1.html) may not load or link to "chrome://selenium-ide-testrunner/content/selenium/selenium-test.css"

It seems FF3's default security settings not allow external file access chrome:// resource.
I refer to mozilla docs: https://developer.mozilla.org/en/Chrome_Registration#contentaccessible
---------------------------------
It said: (New in FF3) Chrome resources can no longer be referenced from within <img>, <script>, or other elements contained in, or added to, content that was loaded from an untrusted source. This restriction applies to both elements defined by the untrusted source and to elements added by trusted extensions. If such references need to be explicitly allowed, set the contentaccessible flag to yes to obtain the behavior found in older versions of Firefox.

n.b.: Because older versions of Firefox do not understand the contentaccessible flag, any extension designed to work with both Firefox 3 and older versions of Firefox will need to provide a fallback. For example:

content packagename chrome/path/
content packagename chrome/path/ contentaccessible=yes
---------------------------------

So, I try to modify Selenium-IDE1.0b2's chrome.manifest, add contentaccessible=yes
content selenium-ide-testrunner jar:chrome/selenium-ide.jar!/content/ xpcnativewrappers=no
content selenium-ide-testrunner jar:chrome/selenium-ide.jar!/content/ xpcnativewrappers=no contentaccessible=yes

It displayed CSS correctly this time on FF3 Selenium Chrome TestRunner.

Shinya, Can you have a try and verify this troubleshooting?
Many people like me run Selenium-Core by FF3 Chrome mode, not only IDE panel. This is a critical bug for them on FF3.

Moreover, FF3 Security.fileuri.strict_origin_policy issue still hasn't been fixed. Can you take a look?


Jerry Qian added a comment - 27/Dec/08 11:01 PM

A FF3 patch for chrome.manifest


Jerry Qian made changes - 27/Dec/08 11:01 PM
Attachment chrome-manifest.patch [ 11721 ]
pvtrao added a comment - 02/Feb/09 03:05 AM

Hi Jerry,

This patch is working fine for me. Now the CSS is applying to the Test runner in Chrome mode.
It is better if this patch is incorporated into the selenium release.

Thanks,
Venkat.


Shinya Kasatani added a comment - 18/Feb/09 12:51 AM

Thanks Jerry for the patch. I've applied it in r506.


Shinya Kasatani made changes - 18/Feb/09 12:51 AM
Resolution Fixed [ 1 ]
Status Reopened [ 4 ] Resolved [ 5 ]