Re: Javascript ALERT, CONFIRM popup windows interaction

"Baumgartner, Jason L" <[email protected]> Mon, 10 Mar 2008 09:20:08 -0400
Newsgroups gmane.comp.mozilla.jrex
Message-ID <9BD38514D4322B4DA45BEB48A02B7D3C0211B72981@iu-mssg-mbx05.ads.iu.edu>
--===============0486953668==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_9BD38514D4322B4DA45BEB48A02B7D3C0211B72981iumssgmbx05ad_"

--_000_9BD38514D4322B4DA45BEB48A02B7D3C0211B72981iumssgmbx05ad_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

You can set various browser settings in JRex like the following:

JRexPreference.getInstance().setBoolPref("security.warn_entering_secure", f=
alse);
JRexPreference.getInstance().setBoolPref("security.warn_entering_weak", fal=
se);
JRexPreference.getInstance().setBoolPref("security.warn_leaving_secure", fa=
lse);

I don't know if these will work for you but you can always look at the Mozi=
lla listing of preferences to see additional options.  I hope this helps. -=
 Jason

From: [email protected] [mailto:[email protected]] On Behalf Of=
 Olivier Deruelle
Sent: Tuesday, March 04, 2008 9:37 PM
To: [email protected]
Subject: [JRex] Javascript ALERT, CONFIRM popup windows interaction

Hello,

I am developing a JAVA application using JREX that will playback some HTML =
pages, i.e. clicking some links, inputting some values, clicking buttons,..=
.

The issue I have so far is that clicking on some HTML buttons causes JAVAsc=
ript ALERT or CONFIRMATION popup windows.
I would like to programmatically click on the "OK" or "CANCEL" buttons when=
 those javascript Alert windows pop up.

I did not find a way to do that, can anyone help to guide me to the right f=
unctions, classes?
Thanks,

Regards,
Olivier.

--_000_9BD38514D4322B4DA45BEB48A02B7D3C0211B72981iumssgmbx05ad_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal;
	font-family:"Arial","sans-serif";
	color:windowtext;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",=
"sans-serif";
color:#1F497D'>You can set various browser settings in JRex like the follow=
ing:<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",=
"sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal style=3D'text-autospace:none'><span style=3D'font-size=
:8.0pt;
font-family:"Courier New";color:black'>JRexPreference.<i>getInstance</i>().=
setBoolPref(</span><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:#2A00FF'>&quot;sec=
urity.warn_entering_secure&quot;</span><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:black'>, </span><b=
><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:#7F0055'>false</sp=
an></b><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:black'>);</span><s=
pan
style=3D'font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=3DMsoNormal style=3D'text-autospace:none'><span style=3D'font-size=
:8.0pt;
font-family:"Courier New";color:black'>JRexPreference.<i>getInstance</i>().=
setBoolPref(</span><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:#2A00FF'>&quot;sec=
urity.warn_entering_weak&quot;</span><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:black'>, </span><b=
><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:#7F0055'>false</sp=
an></b><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:black'>);</span><s=
pan
style=3D'font-size:8.0pt;font-family:"Courier New"'><o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:8.0pt;font-family:"Courier Ne=
w";
color:black'>JRexPreference.<i>getInstance</i>().setBoolPref(</span><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:#2A00FF'>&quot;sec=
urity.warn_leaving_secure&quot;</span><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:black'>, </span><b=
><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:#7F0055'>false</sp=
an></b><span
style=3D'font-size:8.0pt;font-family:"Courier New";color:black'>);&nbsp;&nb=
sp; </span><span
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'=
><o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",=
"sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",=
"sans-serif";
color:#1F497D'>I don&#8217;t know if these will work for you but you can al=
ways look
at the Mozilla listing of preferences to see additional options.&nbsp; I ho=
pe this
helps. - Jason<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",=
"sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in =
0in 0in'>

<p class=3DMsoNormal><b><span style=3D'font-size:10.0pt;font-family:"Tahoma=
","sans-serif"'>From:</span></b><span
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
[email protected] [mailto:[email protected]] <b>On Behalf Of </=
b>Olivier
Deruelle<br>
<b>Sent:</b> Tuesday, March 04, 2008 9:37 PM<br>
<b>To:</b> [email protected]<br>
<b>Subject:</b> [JRex] Javascript ALERT, CONFIRM popup windows interaction<=
o:p></o:p></span></p>

</div>

</div>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'>Hello,<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'>I
am developing a JAVA application using JREX that will playback some HTML pa=
ges,
i.e. clicking some links, inputting some values, clicking buttons,&#8230;<o=
:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'>The
issue I have so far is that clicking on some HTML buttons causes JAVAscript
ALERT or CONFIRMATION popup windows. <o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'>I
would like to programmatically click on the &#8220;OK&#8221; or &#8220;CANC=
EL&#8221; buttons when those
javascript Alert windows pop up.<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'>I
did not find a way to do that, can anyone help to guide me to the right
functions, classes?<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'>Thanks,<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'><o:p>&nbsp;</o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'>Regards,<o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","s=
ans-serif"'>Olivier.<o:p></o:p></span></p>

</div>

</body>

</html>

--_000_9BD38514D4322B4DA45BEB48A02B7D3C0211B72981iumssgmbx05ad_--

--===============0486953668==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
JRex mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/jrex

--===============0486953668==--