How to verify JavaScript alert message display on page with C#?
Hi All,
I have a question about verify the JavaScript alert message on page. For example, I input the script in browser address like: "javascript:onmouseover=alert('popup windows')" . How to verify there's a alert message displayed on page with C#?
Thanks
Are you trying to use some automation or ? What the previous solution is they have put the text in the dom for you to pull out with C# or other languages.
if you are trying to automate this through a browser maybe look into WebDriver
WebDriverWait wait = new WebDriverWait(driver, 2);
wait.until(ExpectedConditions.alertIsPresent());
Alert alert = driver.switchTo().alert(); var alertText = alert.Text;
alert.accept();
Similar Messages
-
How to convert javascript alert message into an Inline message in Apex Page
Hi All. Im new to Apex.
Present Approach -
I have a dynamic report region developed using API's like APEX_ITEM etc. I am using java scripts to validate these dynamic items and popup alert messages as shown below -
function ValidateNotObservedCB(p_row_num)
var v_row_num = p_row_num;
var v_not_observed_cb_status = document.getElementById('f_notobserved_'+v_row_num).checked;
var v_not_in_district_cb_status = document.getElementById('f_notindistrict_'+v_row_num).checked;
var v_program_code = document.getElementById("f_program_code_"+v_row_num).value;
if ( (v_program_code.length>0)&& ( document.getElementById('f_notobserved_'+v_row_num).checked==true ))
bold alert("You have already entered a program code.") bold
document.getElementById('f_notobserved_'+v_row_num).checked=false ;
document.getElementById('f_notobserved_'+v_row_num).value='N';
} else if ( (v_program_code.length==0)&& ( document.getElementById('f_notobserved_'+v_row_num).checked==true )) {
document.getElementById('f_notobserved_'+v_row_num).value='Y';
document.getElementById('f_notobserved_'+v_row_num).checked=true ;
} else
document.getElementById('f_notobserved_'+v_row_num).checked=false ;
document.getElementById('f_notindistrict_'+v_row_num).checked=false;
document.getElementById('f_notindistrict_'+v_row_num).value='N';
document.getElementById('f_notobserved_'+v_row_num).value='N';
Question/Issue - How can I convert these alert messages into Inline messages to show on the page, similar to what appears when we do Item Validations in APEX.
Waiting for responses as this is an urgent requirement.
Thanks in Advance,
MadhuHi,
I did with jQuery small sample
http://apex.oracle.com/pls/otn/f?p=40323:36
Page HTML header is
<script type="text/javascript">
$(function(){
var lImg = $('<img alt="" class="pb" style="float: right;" src="/i/delete.gif"/>');
var lMesg = $('<div id="MESSAGE" style="border-top: 1px solid rgb(142, 170, 142); border-bottom: 1px solid rgb(142, 170, 142); padding: 5px; background: rgb(235, 241, 235) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 450px;" class="t14notification"></div>');
$('.pb').live('click',function(){
$x_Remove("MESSAGE");
$('#SUBMIT').click(function(){
if($('#MESSAGE').length == 0){
$('#t14Messages').children().append($(lMesg));
$(lMesg).append($(lImg));
$(lImg).after($('#P36_NOTIFICATION').val());
}else{
$('#MESSAGE').text('');
$('#MESSAGE').append($(lImg));
$(lImg).after($('#P36_NOTIFICATION').val());
</script>I do not know does it help. Using this depend much on theme, defined class and IDs.
Br, Jari -
Not able to display javascript alert message from within a pl/sql block
Hello,
Can anyone please help me out with this issue. I wanted to display an javascript alert message from within a pl/sql block for an update button. Below is sample code which i am using. P1_ITEM is my hidden item on the report.
begin
if :P1_ITEM IS NOT NULL then
HTP.p ('<script type="text/javascript">');
HTP.p ('alert(''Please complete the item which is already assigned to you!'');');
HTP.p ('</script>');
end if;
end;
and I have made this code to be executed conditionally when request = Expression1
Expression1: SUBMIT
The thing is I am not able to display an alert message when the update button is clicked.
Can anyone please help me with this one.
Thanks,
Ortonvarad but I also have an update statement within that block for the update button something like this i want to achieve.
begin
if :P1_ITEM IS NULL THEN
update sample_tbl
set col1 =:APP_USER,
col2 = 'Y'
where pk_col = ---;
commit;
HTP.p ('<script type="text/javascript">');
HTP.p ('alert(''Successfully assigned an item!'');');
HTP.p ('</script>');
end if;
if :P1_ITEM IS NOT NULL then
HTP.p ('<script type="text/javascript">');
HTP.p ('alert(''Please complete the item which is already assigned to you!'');');
HTP.p ('</script>');
end if;
end;
thanks,
Orton -
Synching iPhone after factory restore and restore from backup; synching appears stuck on Step 5 of 5, "waiting for items to copy." That message displays for hours with no apparent progress.
I never had this problem, but just noticed it happening.. Please note it's a BUG. I went out and bought a 128GB iPhone just to hold all my songs. It wouldn't work. This never happened with the iPhone 3/3s/4/5/5s but started happening with the iPhone 6. After 40 hours of working through all possible solutions on the web and with Apple cares support (supposedly senior level) They finally suggested what the problem was. I had "Convert higher bit songs to 128 aac" Checked. This does not work One more thing when I unchecked that, the sync took like 3.5 hours instead of the 9-12 hours is usually took even on the smaller iphones. I have 98.7GB of music. Before I was just syncing a list of specific songs.
The syncing seems to be random when it has the problem though. -
I am a new iPad Air user. How do I get back to the home page with all the icons.
I Am a new user. How do I get back to the home page with all the icons.
iPad Manual
http://manuals.info.apple.com/en_US/ipad_user_guide.pdf -
How to show javascript alert popup after commandLink action?
Hi,
I'm building an ADF-based .jspx page. I have a commandLink whose action calls a method in my page's backing bean. I want to show a javascript alert popup when the commandLink is clicked and after the backing bean method has been called. The text displayed in the alert popup is dependent on whether the processing in the method was successful or not.
I couldn't figure out how this could be done though. It doesn't seem I can use the onClick attribute on the commandLink because that gets called before my backing bean method gets called. From my backing bean method, is there some way to launch a javascript alert popup and show certain text in it based on what happened in the method?
Thanks for any ideas.Hello and thank you for your reply,
I am trying to combine dwr and ADF.
When I use the following code to grasp the input value from the user
FacesContext fc = FacesContext.getCurrentInstance();
ValueBinding expr = fc.getApplication().createValueBinding("#{bindings['LIMARXESPORTCODE_bindVariable2'].inputValue}");
setLIMARXESPORTCODEbindVariable( expr.getValue(fc).toString() );
in order to use it as a dynamic bind variable to the where clause of the following query:
vo.setWhereClause("LIMARXESPORTCODE = :LIMARXESPORTCODE_bindVariable");
vo.defineNamedWhereClauseParam("LIMARXESPORTCODE_bindVariable", null, null);
vo.setNamedWhereClauseParam("LIMARXESPORTCODE_bindVariable", LIMARXESPORTCODEbindVariable );
executeAndShowResults(vo);
in the backing bean java code. All I get as an output from a javascript alert window is null.
However, when the bean member variable LIMARXESPORTCODEbindVariable has a
hard coded, static value i.e. LIMARXESPORTCODEbindVariable = 111; and the first code snippet is commented out, everything works just fine!
Any hint is welcome,
T I A. -
How to configure an Alert message if communicationChannel(JMS) stops
All,
Is there a way how to configure an alert when the communication channel stops.
<b>Scenario:</b>
In the path Runtime workbench->Component Monitoring->Adapter Engine->Communication Channel monitoring, if we see that a communication channel has stopped(RED traffic light as Status), then can we trigger an alert notification for same.
Currently we have alrerts configured for any message/s failure in the JMS Adapter Framework. So can we trigger simmilar alerts when a comm channel stops(for whatever reason).
Thanks in advance
RKHi Sreeram,
Thanks for the quick reply.
We have a scenario where we activate individual channels at a given time. So in this case, Adapter will always be in RED as all queues are never running in our scenario.
So we need an ALERT to be triggered for individual comm channels. Is theer any way that you can think of ?
Thanks and regards
RK -
Hi, what steps must I take to add an alert message that reminds the Adobe Reader end user to Print their form if they wish to keep a record of their form data.
Also, where should such an alert appear, when and upon which event type?
HarryThanks Jimmy, unfortunately it doesn't work on my Submit button (which is where I do want it).. Here's what I have on the standard Submit button.
----- form1.SF_P8.SF_print-submit.EmailSubmitButton::click - (JavaScript, client) ------------------
xfa.messageBox("Please ensure you also print a copy for your records", Warning, 1, 1);
this makes my button do nothing at all, not even submit. I think it's because there are 2 events associated with it, the invisible "submit" and the new warning. Any suggestions?
Harry -
How to fire a Alert Message in a table format
Hi friends,
Currently im performing an Alert. My requirement is i need to display the alert message to the user in the mail in a table format.
But i couldnt perform that, as the alert is not displaying in a properly aligned table format.
Can you friends propose me a right way to bring the alert in a table format with two columns.
Thanks in Advance..
Regards,
SaroI agree w 936671, do this in PL/SQL. Much, much easier.
However, I will recommend a different approach using PL/SQL.
1) Create a package to send the emails. Sample code:
create or replace package cust_fnd_utilities as
procedure send_email( p_sender in varchar2,
p_recipient in varchar2,
p_subject in varchar2,
p_message in varchar2);
end cust_fnd_utilities;
create or replace package body cust_fnd_utilities as
procedure send_email( p_sender in varchar2,
p_recipient in varchar2,
p_subject in varchar2,
p_message in varchar2)
is
v_mail_host varchar2(30);
v_crlf constant varchar2(2):= chr(13)||chr(10);
v_message varchar2(10000);
v_mail_conn utl_smtp.connection;
begin
v_mail_host := 'localhost';
v_mail_conn := utl_smtp.open_connection(v_mail_host, 25);
v_message := 'Date: ' ||
to_char(sysdate, 'dd Mon yy hh24:mi:ss') || v_crlf ||
'From: <'|| p_sender ||'>' || v_crlf ||
'Subject: '|| p_subject || v_crlf ||
'To: '||p_recipient || v_crlf || '' || v_crlf || p_message;
utl_smtp.ehlo(v_mail_conn, v_mail_host);
utl_smtp.mail(v_mail_conn, p_sender);
utl_smtp.rcpt(v_mail_conn, p_recipient);
utl_smtp.data(v_mail_conn, v_message);
utl_smtp.quit(v_mail_conn);
exception
when others then
utl_smtp.close_connection(v_mail_conn);
end send_email;
end cust_fnd_utilities;
2) Build the email, then call the package from step #1. Sample code:
create or replace package cust_fnd_monitoring as
procedure profile_options_build_email ( p_errbuf out varchar2,
p_retcode out varchar2,
p_sender in varchar2,
p_recipient in varchar2);
end cust_fnd_monitoring;
create or replace package body cust_fnd_monitoring as
procedure profile_options_build_email ( p_errbuf out varchar2,
p_retcode out varchar2,
p_sender in varchar2,
p_recipient in varchar2)
is
v_subject varchar2(100) := 'erpgamd1 - Recent Profile Option Changes';
v_mime_type varchar2(100) := 'Content-Type: text/html';
v_body varchar2(10000);
v_line_feed varchar2(1):=chr(10);
cursor profile_cur is
select p.user_profile_option_name,
u.user_name,
u.description,
r.responsibility_name,
v.last_update_date
from fnd_profile_option_values v,
fnd_profile_options_vl p,
fnd_user u,
fnd_responsibility_vl r
where p.application_id = v.application_id
and p.profile_option_id = v.profile_option_id
and v.last_updated_by = u.user_id
and v.level_id = 10003
and v.level_value = r.responsibility_id
and v.level_value_application_id = r.application_id
and r.creation_date <= '01-NOV-2010'
and v.last_update_date >= sysdate-7
and u.user_name != '204020779'
union all
select p.user_profile_option_name,
u.user_name,
u.description,
'Site' responsibility_name,
v.last_update_date
from fnd_profile_option_values v,
fnd_profile_options_vl p,
fnd_user u
where p.application_id = v.application_id
and p.profile_option_id = v.profile_option_id
and v.last_updated_by = u.user_id
and v.level_id = 10001
and v.last_update_date >= sysdate-7
and u.user_name != '204020779'
order by 5 desc,4;
profile_rec profile_cur%rowtype;
begin
open profile_cur;
<<profile_loop>>
loop
fetch profile_cur into profile_rec;
exit when profile_cur%notfound;
if profile_cur%rowcount = 1 then
-- We need to confirm that we fetch at least one row. Once we have confirmed, we want to generate
-- the email body heading only during the first pass through the loop.
v_body := '<html>' || v_line_feed;
v_body := v_body || '<body style="font-family:arial;font-size:10pt">' || v_line_feed || v_line_feed;
v_body := v_body || '<table cellspacing="5">' || v_line_feed;
-- table heading
v_body := v_body || '<tr>' || v_line_feed;
v_body := v_body || '<td align="left"><u>profile option name</u></td>' || v_line_feed;
v_body := v_body || '<td align="left"><u>responsibility name</u></td>' || v_line_feed;
v_body := v_body || '<td align="left"><u>last update date</u></td>' || v_line_feed;
v_body := v_body || '<td align="left"><u>SSO #</u></td>' || v_line_feed;
v_body := v_body || '<td align="left"><u>user name</u></td>' || v_line_feed;
v_body := v_body || '</tr>' || v_line_feed;
end if;
-- table detail
v_body := v_body || '<tr>' || v_line_feed;
v_body := v_body || '<td>' || profile_rec.user_profile_option_name || '</td>' || v_line_feed;
v_body := v_body || '<td>' || profile_rec.responsibility_name || '</td>' || v_line_feed;
v_body := v_body || '<td>' || profile_rec.last_update_date || '</td>' || v_line_feed;
v_body := v_body || '<td>' || profile_rec.user_name || '</td>' || v_line_feed;
v_body := v_body || '<td>' || profile_rec.description || '</td>' || v_line_feed;
v_body := v_body || '</tr>'|| v_line_feed;
end loop profile_loop;
if profile_cur%rowcount =0 then
-- The cursor fetched no rows.
-- send email using utl_smtp
cust_fnd_utilities.send_email(p_sender,p_recipient,v_subject || '. No exceptions found.','No exceptions found.');
else
-- Generate the end of the email body if we fetched at least one row.
v_body := v_body || '<table>' || v_line_feed || v_line_feed;
v_body := v_body || v_line_feed || '</body>' || v_line_feed;
v_body := v_body || '</html>' || v_line_feed;
-- send email using utl_smtp
cust_fnd_utilities.send_email(p_sender,p_recipient,v_subject || v_line_feed || v_mime_type,v_body);
end if;
close profile_cur;
end profile_options_build_email;
end cust_fnd_monitoring;
3) In your alert, do not use an email action. Rather, your action should be a SQL*Plus script that calls the package from step #2. -
How to position all alert messages in a particular position?
Hi All,
I have developed a Application where it contains so many Alert Messages and i want display All Alert messages in a particular position of respected screen. I have tried the following code but it works for individual alert messages. I don't want to set x and y properties individually, i want set x and y properties globally. Is there any way that i can apply for all the alert messages in my application.
myAlert = Alert.show('Hello World');
PopUpManager.centerPopUp(myAlert);
myAlert.x = 0;
myAlert.y = 0;
Thanks in AdvanceYou could override the Alert class. This would like something like:
public class MyAlert extends Alert {
public get x():void {
return 0;
public get y():void {
return 0; -
How to disable the alert message that comes in older browsers while loading
Hi!
I'm testing the ADF Rich faces app on Firefox 2.0.01.
It's working fine, but still I get the Error "" You are using unsupported Gecko Browser,the Supported Gecko browsers are 2.0.02 and higher".
I don't want that message to be displayed to the user, though he may be using older browsers..
I Suppose the application developer can handle it according to the demands of the of the situation...
Can you suggest a way to disable that alert message which is very annoying to the user , every time a page is loaded ?
Thanking you in advance,
SambaI filed your complaint as an ER. For tracking purposes the ER number is 6160631.
--RiC -
Alert Message displayed according to WebService response
I've created and used a Web Service in my VC application which simply send a mail. This Web Service returns a boolean response which indicates if the mail has been correctly sent. I want to inform the user accordingly with an alert message.
If the response is correct, I want the user to be processed to confirmation page;
If the response is uncorrect, I want to inform th user accordingly.
Which operator should I use?
Do I have to use the output point of my Web Service object?
ThanksHi,
Thanks Fabien for your answer ... but it hasn't solved completely my problem.
My webservice effectively returns a boolean, and I use this boolean to show wether a confirmation message or a error alert. But the alert form (which is normally displayed only if WSReturn == "false") is by default always displayed. The response sent by my webservice seems to be by default set to false... very strange, isn't it?
Has anybody encountered such a situation? I just would like to display one form or the other depending of the result of my WS call. -
How to stop javascript alert popups from stealing tab focus?
I have two gmail accounts, and usually a lot of tabs open. So sometimes I log into my other gmail account while a tab somewhere else still is logged in to my other. Sooner or later, the gmail with the old login session notices this, and makes a little alert() popup telling me I've been logged out, a couple minutes after I checked my emails on the other account.
Now the problem is, that firefox because of this alert() popup instantly jumps to that tab, and I lose my place in my tab-jungle. This is very annoying. How do I prevent this inactive tab from stealing my focus/alert messages autofocusing tabs?Hello,
Yes I know, but I don't want to do this. Is there any way to stop firefox from behaving this way?
Thanks -
How to Keep the Alert on display until the Thread is Compeletd executing
I want to keep the Alert Still on display until the Thread is compeleted. Once it is completed then i want it to go to the other form
This is how I am trying to do but not able to keep the Alert on display
if (command == cmdDelivery) {
getDisplay().setCurrent(getProcessAlert());
Thread t = new MyThread();
t.start();
}Please let me now how i could solve this
class MyThread extends Thread {
public void run() {
try {
//connect to the net to get Drivers
getJobs(getDriverName());
} catch (Exception e) {
// Display once it has finished thread
getDisplay().setCurrent(getFrmJobList());
}sorry guys, my code did work
-
Re: Alert message display
Dear Experts,
I have written an query for Sales Order Due date, and I have activated the Alert.
My problem is when I execute the query manually the line Items in the query is about 150 lines, But when the system is prompting for the alert I can only view 65 line items in the message window .
Can anyone hwlp me to slove the problem
With Regards,
G.Eshvanth Singh,Please note that the Alerts message window only allow 4000 CHARACTERS. You may need to reduce the number of columns in your query result to be within this maximum.
Regards,
David
Maybe you are looking for
-
Fiscal year variant is incorrect
Dear all, we have an additional daily ledger and daily fiscal year variant related to each other. While trying to see line items by double-clicking, for example, cumulative balance line in FAGLB03 transaction I get the following error: "Fiscal year v
-
RT: 9512 modules fault when using hybrid mode
Hello, I am having an issue with my cRIO hyrbid setup. I am currently using Labview 2010, cRIO 9074, x1 NI 9234, and x3 NI 9512. Summary: What you are trying to accomplish? -I have built two VIs. One that acquired data from an NI 9234. This vi is the
-
How do i FIND a word on a webpage in safari 7?
Since updating to ios 7, I can't figure out how to find a word on a webpage in Safari. In the older version, I could click on the Search box and search the webpage on the screen for a word or phrase. Surely this great feature that's been standard on
-
Flash 11.5.502.135 Crashes incessantly Windows 7 64 bit - all browsers
Afer anything from a second to a few minutes my system just shuts down when playing a flash movie - black screen and no power - with no error logs that I can see in the event viewer. This occurs on 2 seperate laptope I own. One a lenovo thinkpad and
-
Can you change keys for the songs in Magic Garageband?
and if so how?