Jump to content

Digistras

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Digistras

  1. Hi, Anyone able to help please?
  2. This is the html source code of the website: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Cisco SON</title><link rel="shortcut icon" href="http://10.151.9.87:5000/gui/v3/auth/internal_login/favicon.ico"><meta name="description" content=""><link rel="stylesheet" href="Cisco%20SON_files/design.css" type="text/css"><link rel="stylesheet" href="Cisco%20SON_files/design_new.css" type="text/css"><link rel="stylesheet" href="Cisco%20SON_files/internal_login.css" type="text/css"></head><body><!--header area--><div class="top_section"><a class="float_left" href="http://10.151.9.87:5000/gui/v4/#/"><img src="Cisco%20SON_files/cisco_logo.png" alt="Cisco" title="Cisco"></a></div><!--main content area--><div class="content centered_page"><!--left bar area--><div class="left_bar"><div class="left_bar_box login_box"><div class="blue_gradient_strip white_title">Authentication Credentials</div><form method="post" action="/api/v1/system/auth/backends/internal/login" class="internal_login_form"><input placeholder="User name" class="internal_login_form_username" type="text"><input placeholder="Password" autocomplete="off" class="internal_login_form_password" type="password"><input class="big_button" value="Login" title="Login" type="submit"><br><div class="login_messages"><span class="login_success_message" style="display:none;">Login successful. Redirecting...</span><span class="login_fail_message" style="display:none;">Incorrect login credentials. Try again.</span></div></form></div></div><!--right content area--><div class="right_area"><div class="right_area_box login_box"><div class="blue_gradient_strip white_title">Internal Cisco SON Login</div><img src="Cisco%20SON_files/login_computer.png" alt="" title=""><p>Use the login details given to you by your system administrator.</p></div></div><script src="Cisco%20SON_files/json2.js" type="text/javascript"></script><script src="Cisco%20SON_files/namespacer.js" type="text/javascript"></script><script type="text/javascript">;(function(pageJS,intucell,undefined){'use strict';var ext_dic=JSON.parse("{\u0022nextUrl\u0022: \u0022http://10.151.9.87:5000/gui/v4/\u0022, \u0022rootUrl\u0022: \u0022/gui/v3/\u0022, \u0022sonApiVersion\u0022: \u0022v1\u0022}");for(var key in ext_dic){pageJS[key]=ext_dic[key];}}(nsModule('intucell.gui.pageJS'),intucell||{}));</script><script src="Cisco%20SON_files/jquery-1.js" type="text/javascript"></script><script src="Cisco%20SON_files/sugar-1.js" type="text/javascript"></script><script src="Cisco%20SON_files/xregexp.js" type="text/javascript"></script><script src="Cisco%20SON_files/argspec.js" type="text/javascript"></script><script src="Cisco%20SON_files/jquery.js" type="text/javascript"></script><script src="Cisco%20SON_files/jquery_002.js" type="text/javascript"></script><script src="Cisco%20SON_files/cupcake.js" type="text/javascript"></script><script src="Cisco%20SON_files/logger.js" type="text/javascript"></script><script src="Cisco%20SON_files/utils.js" type="text/javascript"></script><script src="Cisco%20SON_files/son_api_interface.js" type="text/javascript"></script><script src="Cisco%20SON_files/auth.js" type="text/javascript"></script><script src="Cisco%20SON_files/jquery_rest.js" type="text/javascript"></script><script src="Cisco%20SON_files/default_args.js" type="text/javascript"></script><script src="Cisco%20SON_files/internal_login.js" type="text/javascript"></script></div></body></html>
  3. Hi, I'm trying to code out auto fill by the "Class" name of a webpage. I have done some trial and errors but all resulted in failures. Quite frankly I'm really at a loss and confused state right now on how to code it or is it even possible. Any advise is fully appreciated. Following is my original code: #include <Constants.au3> #include <IE.au3> If $CmdLine[0] < 2 Then MsgBox($MB_OK, "Usage", "ps_Cisco SON <username> <password>") Else CiscoSON_login($CmdLine[1], $CmdLine[2]) EndIf Func CiscoSON_login($username, $password) Local $ie = _IECreate("https//10.9.11.2", 1) ; COMMENT OUT THIS SECTION IF NOT REQUIRED Local $oIE = _IEAttach("Cisco SON") _IELinkClickByText($oIE, "Continue to this website (not recommended).") If @error > 0 Then Local $i = 0 Do Sleep(500) $i = $i + 1 $ie = _IEAttach("Cisco SON") Until VarGetType($ie) == "Object" Or $i >= 10 EndIf If VarGetType($ie) == "Object" Then $hwnd = _IEPropertyGet($ie, "hwnd") WinSetState($hwnd, "", @SW_MAXIMIZE) ; $login_form = _IEFormGetObjByName($ie, "login_form") $username_field = _IEGetObjByClass($ie, "internal_login_form_username") $password_field = _IEGetObjByClass($ie, "internal_login_form_password") ;$login_button = _IEGetObjByName($ie, "trig_1") ;Might need to change these _IEFormElementSetValue($username_field, $username) _IEFormElementSetValue($password_field, $password) Send("{ENTER}") ;_IEFormSubmit($login_button) WinWaitClose($hwnd) Else MsgBox($MB_OK, "Cisco SON scripr Failure", "Automation failed to automate the login to Cisco SON. If this problem persists please contact your Automation Administrator.") EndIf EndFunc
  4. Hi, Please let me know if I need to provide any additional info for this weird issue.
  5. Please ignore the previous screenshot. Updated screenshot here. Cisco_ASDM-IDM_Launcher_AutoIT.tiff
  6. Hi all, I'm trying to get the Class and Instance ID for this application - Cisco ASDM-IDM Launcher. After I launch the application, I used Au3Info to get the values for Class and Instance it show up as empty. Not sure why. I need to create a script for automated login but I'm missing these values for the script to work. Refer below for the Au3Info Summary output and some screenshots for reference. Appreciate if anyone could input on this. >>>> Window <<<< Title: Cisco ASDM-IDM Launcher v1.7(0) Class: SunAwtFrame Position: 412, 217 Size: 493, 334 Style: 0x16CA0000 ExStyle: 0x00000100 Handle: 0x00190200 >>>> Control <<<< Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: >>>> Mouse <<<< Position: 716, 358 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< Cisco_ASDM-IDM_Launcher_AutoIT.tiff
×
×
  • Create New...