Help javacript and vb.net webbrowser automation

  • Thread starter Thread starter Oscar MZ
  • Start date Start date
O

Oscar MZ

Guest
I'm trying to automate a change password operation on magento but i have a problem.

I need to programmatically simulate a click on the the texbox newpassword to make the currentpassword confirmation visible.

i tried everything nothing work !


""

'elmclient.InvokeMember("onchange")
'elmclient.Focus()
'elmclient.RaiseEvent("change")
'elmclient.RaiseEvent("onclick")
'elmclient.RaiseEvent("OnClick")
'elmclient.InvokeMember("click")

elmclient.InvokeMember("Click")

elmclient.InvokeMember("Focus")

elmclient.InvokeMember("Blur")

elmclient.InvokeMember("Keypress")

elmclient.InvokeMember("KeyDown")"


No solution to have the visibility of the current password field


i found the javacript function in The source code of the page involved and it is :

<script type="text/javascript">
//<![CDATA[
$$('#_accountnew_password,#account-send-pass').each(function(elem) {
$(elem).on('change', function() {
if ($('_accountnew_password').getValue() || $('account-send-pass').checked) {
$('_accountcurrent_password_container').show();
$('_accountcurrent_password').enable();
} else {
$('_accountcurrent_password_container').hide();
$('_accountcurrent_password').disable();
}
});
$(elem).on('focus', function() {
$('_accountcurrent_password_container').show();
$('_accountcurrent_password').enable();
});
$(elem).on('blur', function() {
if (!$('_accountnew_password').getValue() && !$('account-send-pass').checked) {
$('_accountcurrent_password_container').hide();
$('_accountcurrent_password').disable();
}
});
document.observe("dom:loaded", function() {
$('_accountcurrent_password_container').hide();
$('_accountcurrent_password').disable();
});
});
//]]></script></td></tr>



THANKs TO ALL HELPER !!

Continue reading...
 
Back
Top