Need help with IE automation

manonique

New Member
Joined
Jun 13, 2009
Messages
5
Hi Hi!

I need some help with IE automation and I hope some experts here can give me some advise.
On my company intranet, I want to automate uploading documents to the page to minimize error.

I manage to get pass the login & password, go to the right page and I am stuck there.
The next step is to click on a button ("Attach New Referral"), where a dialogue box will prompt and ask for identification number.
Upon input, click Validate. Then the next box is asking to choose the file to upload, select and Click Save.

Sorry as I seldom post, any codes or shortcuts are very new to me.

I hope this code could help:

Code

******** src="/AdminWeb/bundles/common?v=4C-Oj1AnhcbOOBi9XqehLuq2EQ074F-bNrb4N8E9wEQ1">*********>



******** type="text/javascript">
/// <reference path="../../Scripts/jquery-1.10.2.js">
/// <reference path="../../Scripts/jquery-ui-1.10.3.js">
/// <reference path="../../Scripts/jquery.validate.js">
/// <reference path="../../Scripts/jquery.validate.unobtrusive.js">
/// <reference path="../../Scripts/knockout-2.1.0.debug.js">
/// <reference path="../../Scripts/modernizr-2.5.3.js">
/// <reference path="../../Scripts/jquery-ui-1.10.3.js">
/// <reference path="../../Scripts/linq.js">
/// <reference path="../../Scripts/jquery.linq.js">
$(document).ready(function ($) {
$('#LeftMenu').dcVerticalMegaMenu({
speed: 'fast',
effect: 'slide',
direction: 'right'
});



});


//Fix for IE8


$(document).on("click", "[*******]", function (e) {
if ($(".IE8").length > 0) {
var extText = $(this).attr("*******");

eval(extText);
e.preventDefault();
e.stopPropagation();
}


});


$(document).ajaxError(function (e, data) {
if (data.status == 401) {
******************.href = "/AdminWeb/Base/SessionExpire";

}
else if(data.status==500)
{
alert("System has encountered unexpected problem. Try again or contact helpdesk for this problem. [Error:MG99999]");
}
});

//if ($.browser.version.substring(0, 2) == "8.") {

//}

$(document).on("click", "#__dialog #__btnCloseDialog", function (e) {
$("#__dialog").dialog("close");
});



function __showDialog(width, height) {
var $dialog = $("#__dialog");
$dialog.html("");
$dialog.show();
$dialog.dialog({
modal: true,
width: width,
height: height,
show: "fade",
hide: "clip"
});
}
function __parseValidation(elementId) {
$.validator.unobtrusive.parse("#" + elementId);
}
function __showResult() {
$("#__searchResult").show();
}
function __closeDialog() {
$("#__dialog").dialog("close");
}
//function Logout() {
// $.post("AdminWeb/Login/Logout", null, function (data) {

// }, "_default");
//}
*********>



Welcome Sam Lee (Last login: 8/27/2015 1:59:59 PM) UAT1




  • bg_header_btn_div.png

  • Logout









Select Option











Call Center > Referral Letter



<form action="/AdminWeb/CallCenter/ReferralLetter/Search">










<label for="MRN">MRN</label>

<input id="MRN" name="MRN" type="text" value="">

<label for="CaseNo">Case Number</label>

<input id="CaseNo" name="CaseNo" type="text" value="">

<tbody>
</tbody>


<button data-click="Search" class="ui-state-default ui-corner-all" type="button" value="Search" title="Search Referral Letter">Search</button>

<button data-click="Create" data-href="/AdminWeb/CallCenter/ReferralLetter/Create" class="ui-state-default ui-corner-all" type="button" value="Attach New Referral" title="Create Referral Letter">Attach New Referral</button>


</form>





Page:
<input class="pageIndex" data-val="true" data-val-number="The field PageIndex must be a number." data-val-required="The PageIndex field is required." id="PageIndex" name="PageIndex" type="hidden" value="0">

<<
<
12345 >
>>
Total Records: 90






MRNNameVisit RecordFile Upload ByFile Upload TimeRemarkStatus









S3000018HDCA Test 18

01 Sep 2015 08:00 C61 (FV)

CIVOC_HEALTHCHECK27 Aug 2015 14:07
Referral letter for S3000018H


Active








S3000000ETESTING FOR MFD001

01 Sep 2015 08:00 C34PT (AF)

lum0681a27 Aug 2015 13:54


Active








S3000000ETESTING FOR MFD001

28 Aug 2015 08:00 C34PT (AF)

lum0681a27 Aug 2015 13:48


Active








S3000018HDCA Test 18

31 Aug 2015 08:00 C61 (FV)

CIVOC_HEALTHCHECK27 Aug 2015 13:43
Referral letter for S3000018H


Active








S3000018HDCA Test 18

28 Aug 2015 08:00 C61 (FV)

CIVOC_HEALTHCHECK27 Aug 2015 13:32
Referral letter for S3000018H


Active








S4412065HTendy Hendra

28 Aug 2015 15:00 C61 (RV)

CIVOC_HEALTHCHECK26 Aug 2015 14:51
This is 27 Augus file


Active








S4412065HTendy Hendra

27 Aug 2015 09:00 C44 (RV)

CIVOC_HEALTHCHECK26 Aug 2015 14:29
This is 27 Augus file


Active








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG

06 Aug 2015 15:47 C44 (FV)

CIVOC_HEALTHCHECK24 Aug 2015 12:47


Active








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG

26 Oct 2015 13:50 C61 (FV)

CIVOC_HEALTHCHECK24 Aug 2015 12:40


Inactive








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG

06 Aug 2015 15:47 C44 (FV)

CIVOC_HEALTHCHECK24 Aug 2015 12:38


Inactive








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG



CIVOC_HEALTHCHECK24 Aug 2015 12:07


Active








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG



CIVOC_HEALTHCHECK24 Aug 2015 12:06


Active








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG



CIVOC_HEALTHCHECK24 Aug 2015 12:06


Active








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG

26 Oct 2015 13:50 C61 (FV)

CIVOC_HEALTHCHECK20 Aug 2015 11:38


Inactive








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG

26 Oct 2015 13:50 C61 (FV)

CIVOC_HEALTHCHECK18 Aug 2015 15:56


Inactive








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG

06 Aug 2015 15:47 C44 (FV)

CIVOC_HEALTHCHECK21 Jul 2015 11:51


Inactive








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG



CIVOC_HEALTHCHECK21 Jul 2015 11:35


Active








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG



CIVOC_HEALTHCHECK21 Jul 2015 11:34


Active








F1973812NRONNY TAN HOCK SIONG RONNY TAN HOCK SIONG

21 Nov 2015 11:29 C61 (RV)

CIVOC_HEALTHCHECK21 Jul 2015 11:32


Active









<thead>
</thead> <tbody class="TabBody">
</tbody>


Page:
<input class="pageIndex" data-val="true" data-val-number="The field PageIndex must be a number." data-val-required="The PageIndex field is required." id="PageIndex" name="PageIndex" type="hidden" value="0">

<<
<
12345 >
>>
Total Records: 90





******** type="text/javascript">
$(".spanRemark").tooltip();
//
// a:visited {
// color:blue;
// text-decoration:#666;
// }
*********>
<style>
.byte
{
width: 100px;
color: #666;
font-size: 12px;
BORDER-TOP-WIDTH: 0px;
BORDER-LEFT-WIDTH: 0px;
BACKGROUND: none transparent scroll repeat 0% 0%;
BORDER-BOTTOM-WIDTH: 0px;
MARGIN: 0px;
VERTICAL-ALIGN: middle;
BORDER-RIGHT-WIDTH: 0px;
}


.TabBody tr
{
height: 30px;
}


</style>






******** src="/AdminWeb/bundles/referralLetter?v=CpAFs0070-l0Dw5bUq0u0b2OreGBkJMTNI7xE7wp1O41">*********>










********>
$(function () {
if ($("#__searchResult").html() != undefined && $("#__searchResult").children().length == 0) {
$("#btnSearch,[data-click=Search]").click();
}
});



*********></reference></reference></reference></reference></reference></reference></reference></reference></reference><style type="text/css">
.popupContent input, .popupContent select {
width: 300px;
}
</style>
 
Last edited:

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,215,883
Messages
6,127,540
Members
449,385
Latest member
KMGLarson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top