Jump to content

dianaManolito

Members
  • Posts

    8
  • Joined

  • Last visited

dianaManolito's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. After the window appears , the script hangs. No other statement is executed. Not even a ConsoleWrite("whatever"). I manage to click on the Browse button. The "Choose File" window appears and then ........nothing. Local $is= _IEGetObjByName($oIE, "ctl00_placeHolderMain_flOpen") _IEAction($is, "click") ;;;;;;window appears ConsoleWrite("jhghgh") ;no text in console
  2. Hi ! I am trying to automate some of my tests on a web page that has as mandatory fields a text field where a user should fill in a valid file. Pretty close to this text field, is a Browse button. -The textField is readonly, so the user can only interact with the Browse button to choose the file. -The Browse button doesn't have focus. -If the Browse button is pressed, a 'Choose File' window appear. I need to fill in a file, so i can go on with my scripts. Can anyone tell me how to deal with that "Choose File" window? Does AutoIt have some functions or methods to choose automatically a file? Thx, Diana
  3. It's working. I used the AdLibEnable , like you suggested, Jefhal. The code looks like : Local $reset $reset=$documentIE.getElementsByTagName("table").item(7).getElementsByTagName("tr").item(1).getElementsByTagName("td").item(4).getElementsByTagName("a").item(0) sleep(1000) _IEAction($reset, "focus") sleep(2000) Send("{ENTER}") sleep(2000) ..... Func myadlib() If ControlFocus("Microsoft Internet Explorer","OK",1) Then ControlClick("Microsoft Internet Explorer", "OK", 1) EndIf EndFunc Thanks, Diana
  4. I modified the code like: ...... AdlibEnable("myadlib") Local $reset $reset=$documentIE.getElementsByTagName("table").item(7).getElementsByTagName("tr").item(1).getElementsByTagName("td").item(4).getElementsByTagName("a").item(0) _IEAction($reset, "click") ; pop up appears ...... Func myadlib() If WinActive("Microsoft Internet Explorer" , "") Then send("{ENTER}") else WinActivate("Microsoft Internet Explorer" , "") send("{ENTER}") EndIf EndFunc ................... The link i'm trying to click is : <a id="dgUsers__ctl3_LinkResetPassword" class="navlinkblack" name="LinkResetPassword" onclick="return confirm( 'Are you sure you want to reset user password?');" href="java script:__doPostBack('dgUsers$_ctl3$LinkResetPassword','')"> reset </a> it looks like the script is waiting for something to happen. A Javascript confirm() box comes up that says "Press OK / Cancel". The box does not go away automatically. I'm trying to use AUTOIT to test my applicaiton, and I need to be able to click the OK button in javascript confirmation box. Any help would be appreciated, Diana
  5. no statement is working after i click on that link (THAT IS AFTER THE POP UP APPEARS ), even if the statement is a simple ConsoleWrite ("blah blah blah") ::::::::::::::::::::::: _IEAction($reset, "click") ; ~~~~~~~~~~the confirmation window appears. waiting for user's choice : Ok or Cancel ConsoleWrite ("blah blah blah") ::::::::::::::::::::::: Nothing is displayed. Why is that ?
  6. hi I cannot manage to press a button in a pop up confirmation box. The confirmation box is generated after making click on a link in a web page ("Are you sure you want to ....? ") My code is : Local $reset $reset=$documentIE.getElementsByTagName("table").item(7).getElementsByTagName("tr").item(1).getElementsByTagName("td").item(4).getElementsByTagName("a").item(0) _IEAction($reset, "click") WinWait("Microsoft Internet Explorer" , "") If Not WinActive("Microsoft Internet Explorer" , "") Then WinActivate("Microsoft Internet Explorer" , "") WinWaitActive("Microsoft Internet Explorer","") EndIf Send("{ENTER}") After the click on the link, the confirmation message appears. Anything after that line (_IEAction($reset, "click")) doesn't work. Entire script is paused until de user makes the choice. i have the following settings : AutoItSetOption("WinTitleMatchMode", 1) AutoItSetOption("WinSearchChildren", 1) The pop up is a simple window, with title "Microsoft Internet Explorer" , the text "are you sure you want to reset the user password?", buttons : OK (button id =1), Cancel (Button ID=2) What am i doing wrong?
  7. Thanks Larry, your example is a common sense one , but i still don't like the following AUTOIT sorting : - 1 -1 ??
  8. Hi ! I have a trouble with string comparison. Apparently, the following snippet returns : "yes" if "-" < "1" then MsgBox(1,"","yes") ELSE MsgBox(1,"","no") EndIf ---------------- The second snippet returns : "no" if "-1" < "1" then MsgBox(1,"","yes") ELSE MsgBox(1,"","no") EndIf ----------- How is this possible if this is a string comparison. "-" (dash) has the ASCII code 45 and is smaller than the ASCII code for 1 (which is 49). How is the sorting of strings performed? ::::: Compare the first letter=> if equal, go to next one. If the second letter is smaller(/greater), take the decision. Or is some other method used? ex: The database "ORDER BY " clause seems to have this behavior. Can you help me with this? How can i force the AUTOit to compare each character separately? Thanks, Manolito
×
×
  • Create New...