我在处理 java 脚本警报时遇到问题..
我可以在网页中导航并输入数据,但是选择不同的项目以更新显示的模式警报。
如何单击确定按钮 tru VBA?
任何帮助请...
这是网页中的代码,我认为当我选择触发警报的项目时会触发..
这是我在 HTML 脚本中看到的:
function onUpdatedShowAlertTS(varControl) {
if (varControl == "ddlProjectStatus") {
var varconfirm = document.getElementById('ctl00_Tabs_pnlCaptureTSMetrics_CaptureTSMetrics_hdnReleaseStatusConfirmation');
if (varconfirm.value == "true") {
var varControlId = document.getElementById('ctl00_Tabs_pnlCaptureTSMetrics_CaptureTSMetrics_ddlProjectStatus');
var value = varControlId.options[varControlId.selectedIndex].innerText;
alert('Release status is reset to ' + value + ' successfully and validation status is Pending.');
document.getElementById('ctl00_Tabs_pnlCaptureTSMetrics_CaptureTSMetrics_hdnReleaseStatusConfirmation').value = "false";
}
}
if (varControl == "ddlReleaseName") {
var varconfirm = document.getElementById('ctl00_Tabs_pnlCaptureTSMetrics_CaptureTSMetrics_hdnReleaseNameConfirmation');
if (varconfirm.value == "true") {
alert('Release status and and validation status is reset successfully.');
var isReadOnlyStatus = '0'
if (!(isReadOnlyStatus == 1)) {
document.getElementById('ctl00_Tabs_pnlCaptureTSMetrics_CaptureTSMetrics_hdnReleaseNameConfirmation').value = "false";
document.getElementById('ctl00_Tabs_pnlCaptureTSMetrics_CaptureTSMetrics_btnSaveValidate').disabled = false;
}
}
}
这是我的代码:
ieDoc.getElementById("ctl00_Tabs_pnlCaptureTSMetrics_CaptureTSMetrics_hdnConfirmationforReleaseChange").Click
ieDoc.getElementById("ctl00_Tabs_pnlCaptureTSMetrics_CaptureTSMetrics_hdnConfirmationforReleaseChange").setAttribute "value", "true"
ieDoc.getElementById("ctl00_Tabs_pnlCaptureTSMetrics_CaptureTSMetrics_hdnConfirmationforReleaseChange").setAttribute "type", "hidden"