Can log in to AUT using IE, but not Firefox

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Can log in to AUT using IE, but not Firefox

GW-5
I previously used IE with Selenium.

I have changed to FF, due to the fact that IE did not understand some complex xpath expressions (see the post "Strange behaviour with the <select> tag").

The AUT requires login with username and password.

With IE, the login was part of the test. Selenium automatically inserted the username and password, clicked the "Login" button, and launched the Home page of the application.

FF does not allow the login to be done as part of the test. When I use a Selenium "open" command to open the login page, the Selenium part of the GUI disappears and the login page of the AUT is presented. After manually logging in and clicking "Login", I assumed that the Selenium GUI would reappear, with the Home page of the AUT in the lower pane.

However, after logging in, it seems that no further contact with Selenium takes place, and the GUI never reappears.

I tried logging in on one tab, and launching Selenium in another tab, with the Home page of the AUT being called, rather than the login page. (This is similar to Yahoo, where I can log in on one tab, then launch as many tabs as required.)

This works, but the "Continue" button in the Selenium GUI is greyed out, so I cannot proceed with the test.

I'm sure the IT manager will not allow me to test the AUT with the login page disabled for the test.

Can anyone please advise?

Regards,
Alan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1152&messageID=3269#3269

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can log in to AUT using IE, but not Firefox

jamesnot007
Hi Alan,
I had came across the same problem because there was a frameset in my AUT.
When I changed the frameset html and selenium came back.

Is it the case of you?

James
----- Original Message -----
From: "Alan Davidson" <[hidden email]>
To: <[hidden email]>
Sent: Friday, February 10, 2006 12:59 AM
Subject: [selenium-users] Can log in to AUT using IE, but not Firefox


> I previously used IE with Selenium.
>
> I have changed to FF, due to the fact that IE did not understand some
complex xpath expressions (see the post "Strange behaviour with the <select>
tag").
>
> The AUT requires login with username and password.
>
> With IE, the login was part of the test. Selenium automatically inserted
the username and password, clicked the "Login" button, and launched the Home
page of the application.
>
> FF does not allow the login to be done as part of the test. When I use a
Selenium "open" command to open the login page, the Selenium part of the GUI
disappears and the login page of the AUT is presented. After manually
logging in and clicking "Login", I assumed that the Selenium GUI would
reappear, with the Home page of the AUT in the lower pane.
>
> However, after logging in, it seems that no further contact with Selenium
takes place, and the GUI never reappears.
>
> I tried logging in on one tab, and launching Selenium in another tab, with
the Home page of the AUT being called, rather than the login page. (This is
similar to Yahoo, where I can log in on one tab, then launch as many tabs as
required.)
>
> This works, but the "Continue" button in the Selenium GUI is greyed out,
so I cannot proceed with the test.
>
> I'm sure the IT manager will not allow me to test the AUT with the login
page disabled for the test.

>
> Can anyone please advise?
>
> Regards,
> Alan
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=1152&messageID=3269#3269
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can log in to AUT using IE, but not Firefox

Alexandre Garel
In reply to this post by GW-5

Alan Davidson a écrit :

>I previously used IE with Selenium.
>
>I have changed to FF, due to the fact that IE did not understand some complex xpath expressions (see the post "Strange behaviour with the <select> tag").
>
>The AUT requires login with username and password.
>
>With IE, the login was part of the test. Selenium automatically inserted the username and password, clicked the "Login" button, and launched the Home page of the application.
>
>  
>
Is that simple HTTP authentification (that is the pop-up asking for
username/password) or an html form.
In the first case you could try to use an open with
<a href="http://usernam:password@server:port/uri">http://usernam:password@server:port/uri

Hope it helps


Alex.

Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can log in to AUT using IE, but not Firefox

GW-5
James:  There are no frames in my AUT.

Alex:  The login page is an HTML form, and is the first page of the AUT. Similar to the Yahoo login page.

I now have greater understanding of my problem. Here is the history:

1) I can log in OK if I open TestRunner.HTA in IE.

2) FF does not open HTA files, so I renamed the file to TestRunner.HTML. This works for any test, except a test that uses the AUT login page.

3) As an experiment, I opened the TestRunner.HTML file in IE. The behaviour is exactly the same as FF: the login page of the AUT is launched, but not within Selenium. All contact with Selenium is lost.

So, I believe that my login problem is caused by the fact that TestRunner.HTML will not allow me to login within Selenium, irrespective of whether I use IE or FF.

So I need to know how to configure FF to run HTA files (or one specific HTA file). Does anyone know how to do this?

(As a reminder, the reason I want to use FF is that IE does not understand some complex xpaths that are understood by other browsers and xpath analysers.)

I'm not knowledgeable about HTA files, but here is a quote from the Web: "An hta file is simply an html file, but the extension ".hta" means that when navigated to, IE will not
apply the same strict security measures. "

The quote is from:

http://lists.public.thoughtworks.org/pipermail/selenium-users/2005-October/001121.html

Regards,
Alan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1152&messageID=3286#3286

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can log in to AUT using IE, but not Firefox

Alexandre Garel

Alan Davidson a écrit :

>James:  There are no frames in my AUT.
>
>Alex:  The login page is an HTML form, and is the first page of the AUT. Similar to the Yahoo login page.
>
>I now have greater understanding of my problem. Here is the history:
>
>1) I can log in OK if I open TestRunner.HTA in IE.
>
>2) FF does not open HTA files, so I renamed the file to TestRunner.HTML. This works for any test, except a test that uses the AUT login page.
>
>3) As an experiment, I opened the TestRunner.HTML file in IE. The behaviour is exactly the same as FF: the login page of the AUT is launched, but not within Selenium. All contact with Selenium is lost.
>
>So, I believe that my login problem is caused by the fact that TestRunner.HTML will not allow me to login within Selenium, irrespective of whether I use IE or FF.
>
>So I need to know how to configure FF to run HTA files (or one specific HTA file). Does anyone know how to do this?
>  
>
Firefox won't be able to run HTA but it can be configured to lower
security for some pages. See  
http://forums.openqa.org/thread.jspa?messageID=2287. You should try it.
For your information,  I don't feel it as a security policy problem,
maybe your app use some javascript trick like,
windows.document.location=.... which may makes you loose Selenium ?

Hope it helps
Alex.





Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can log in to AUT using IE, but not Firefox

GW-5
In reply to this post by GW-5
Alan,
By chance does your AUT use the Referer header? If you're using driven mode, the Referer header can cause some problems in FF.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1152&messageID=3313#3313

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can log in to AUT using IE, but not Firefox

GW-5
plightbo: I am not using driven mode.

I have advanced partially since my last post. I can now run the AUT from the Selenium Recorder, by opening a URL that contains the username and password in the query string (as suggested by Alex).

However, the same technique does not work when I use TestRunner with FF. In this case, the Home page is launched, but the "Continue" button in the Selenium GUI is greyed out.

I have found that the Recorder cannot run user extensions. This implies that the Recorder does not read some files at startup that are read by TestRunner.

The question is: Why can I log in to the AUT when I use the Recorder, but not when I use TestRunner? It must be due to the fact that TestRunner reads several files at startup, and something in one of those files is preventing the test from continuing. Can anyone advise how I can find this line, and somehow hack round the line?

Regards,
Alan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1152&messageID=3345#3345

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can log in to AUT using IE, but not Firefox

Alexandre Garel

Alan Davidson a écrit :

>plightbo: I am not using driven mode.
>
>I have advanced partially since my last post. I can now run the AUT from the Selenium Recorder, by opening a URL that contains the username and password in the query string (as suggested by Alex).
>
>However, the same technique does not work when I use TestRunner with FF. In this case, the Home page is launched, but the "Continue" button in the Selenium GUI is greyed out.
>
>I have found that the Recorder cannot run user extensions. This implies that the Recorder does not read some files at startup that are read by TestRunner.
>  
>
I was thinking it could as you can indicate where your user extension is
located.

>The question is: Why can I log in to the AUT when I use the Recorder, but not when I use TestRunner? It must be due to the fact that TestRunner reads several files at startup, and something in one of those files is preventing the test from continuing. Can anyone advise how I can find this line, and somehow hack round the line?
>  
>
Have you looked at the javascript console ? (in tools menu).

Hope it helps
Alex.


Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can log in to AUT using IE, but not Firefox

GW-5
1) How does the Selenium Recorder know where the user extensions are? I tried using the line in the head of the file, but the Recorder did not recognize my extensions.

<script language="JavaScript" type="text/javascript" src="C:\selenium\user-extensions.js"></script>



2)  When I use the Javascript console, and when running TestRunner.html in FF, I see the error message:

Error: [Exception... "'Permission denied to call method Location.toString' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: "<unknown>"  data: no]
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1152&messageID=3374#3374

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can log in to AUT using IE, but not Firefox

GW-5
Sorry.

I found how to specify the location of "user-extensions.js" in the Recorder options.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1152&messageID=3378#3378

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can log in to AUT using IE, but not Firefox

GW-5
In reply to this post by GW-5
Even I have the exact same problem...It is for sure the problem of Selenium handling of the Firefox.

Now I have not been able to solve it but have researched a lot in this regard. This disabling of the Continue button not in case when we access the public domain sites. Eg if i have my Selenium Code base in C:/ Selenium and I try accessing

http://localhost, it gives me the exception and also disables the Continue button, but when i access google am abel to run it all..

Plz let me know incase u have got any lead on it.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1152&messageID=3387#3387

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can log in to AUT using IE, but not Firefox

GW-5
I think I can do anything with the Recorder. The only disadvantage is that I can't run "suites" of tests. But I don't have many tests to run, so this is not a problem. I could use "include".

I can run the following sequentially in the recorder, but not with TestRunner.html in FF. The "Continue" button is greyed out.

<tr>
        <td>open</td>
        <td>http://www.google.com</td>
        <td></td>
</tr>

<tr>
        <td>open</td>
        <td>http://mail.yahoo.com</td>
        <td></td>
</tr>

<tr>
        <td>open</td>
        <td>http://news.google.com</td>
        <td></td>
</tr>


Here is my experience of running IE and FF:


Browser | TestRunner.hta |  TestRunner.html  | Selenium Recorder
  IE    |       OK       | Permission denied |   Not possible
  FF    | Not possible   | Permission denied |        OK

Someone should contact the developer of the recorder, and ask how the recorder bypasses the "same origin" restrictions.

Maybe he temporarily removes the restrictions at the start of the test, and restores them at the end of the test.

I can't get the "same origin" capability to work. This is what I tried:

user_pref("capability.policy.policynames", "trustable");
user_pref("capability.policy.trustable.sites", "http://localhost http://www.google.com http://mail.yahoo.com http://news.google.com");
user_pref("capability.policy.trustable.Window.open", "allAccess");
user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "http://localhost http://www.google.com http://mail.yahoo.com http://news.google.com");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1152&messageID=3394#3394

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: Can log in to AUT using IE, but not Firefox

Alexandre Garel

Alan Davidson a écrit :

>Someone should contact the developer of the recorder, and ask how the recorder bypasses the "same origin" restrictions.
>
>Maybe he temporarily removes the restrictions at the start of the test, and restores them at the end of the test.
>  
>
In firefox, extensions do not have any restrictions. Selenium IDE is an
extension. That's all.

>I can't get the "same origin" capability to work. This is what I tried:
>
>user_pref("capability.policy.policynames", "trustable");
>user_pref("capability.policy.trustable.sites", "http://localhost http://www.google.com http://mail.yahoo.com http://news.google.com");
>user_pref("capability.policy.trustable.Window.open", "allAccess");
>user_pref("capability.policy.policynames", "localfilelinks");
>user_pref("capability.policy.localfilelinks.sites", "http://localhost http://www.google.com http://mail.yahoo.com http://news.google.com");
>user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
>  
>
I think you have to do the contrary, that is tell fierfox that your
server (where selenium runs) is trustable not the site you want to test.

Hope it helps
Alex.






Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: Can log in to AUT using IE, but not Firefox

GW-5
>>I think you have to do the contrary, that is tell fierfox that your
>>server (where selenium runs) is trustable not the site you want to test.

That proves how non-technical I am.

Selenium is on my PC, which is networked. What line do I need to include in the "capability"?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1152&messageID=3402#3402

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: Can log in to AUT using IE, but not Firefox

Alexandre Garel

Alan Davidson a écrit :

>>>I think you have to do the contrary, that is tell fierfox that your
>>>server (where selenium runs) is trustable not the site you want to test.
>>>      
>>>
>
>That proves how non-technical I am.
>
>Selenium is on my PC, which is networked. What line do I need to include in the "capability"?
>  
>
I'm not a specialist, maybe try

user_pref("capability.policy.policynames", "trustable");
user_pref("capability.policy.trustable.sites",
"file://your/path/to/selenium/testRunner.html");
user_pref("capability.policy.trustable.Window", "allAccess");
user_pref("capability.policy.trustable.Window.open", "allAccess");
user_pref("capability.policy.trustable.document", "allAccess");

but I don't really know.

Hope it helps
Alex.





Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: Can log in to AUT using IE, but not Firefox

Alexandre Garel
Maybe http://piro.sakura.ne.jp/xul/_policymanager.html.en can help ?

Alex





Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]