Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unable to control browser pop-up file selection form
#1
I'm having trouble using QM with the HTML provided below (which I have heavily edited to try to leave just the important stuff). The HTML displays an edit box, into which a file name can be typed. Or a Browse button can be clicked, at which point a form pops up to allow the user to select the file to be downloaded. Note the Validator at the end of the HTML.

Note that any attempt to access the popup form when run under Firefox fails completely: QM is unable to "see" the popped up form at all. Thus, I am forced to run under IE.

I can get QM to tell me the information about the IE popup form, and even about the file name edit field, but all attempts to manipulate the field have failed. When I do a Click on the field, the file form does pop up, but QM pauses until that form closes before QM continues. This, of course, makes it impossible for me to control that form from QM, which was the whole point of the exercise.

If I replace the Click with a Key, all I hear are beeps: the key strokes never make it successfully to the edit box which is waiting for the file name

Here's the failing QM code:

===

str fName.from("C:\fred.csv");

out "Processing: %s" fName

web "http://localhost/submit/"

Htm el=htm("INPUT" "uploadedfile" "" win("Windows Internet Explorer" "IEFrame") 0 0 0x221)
out "after EL defined"

el.SetFocus
out "after SetFocus"

el.Click
out "after click"

int hwnd=child("" "Edit" win("Choose file" "#32770") 0x5)

===

and here is the minimized HTML:

===


<!--FORM_WIZ{-->
<SCRIPT src="validatorv3.js" type="text/javascript"></SCRIPT>
<!--}FORM_WIZ-->

</head>

<body>

<form name="MAINFORM" enctype="multipart/form-data" method="post" action="takexls2.php">
<input name="uploadedfile" type="file" size="60" style="font-size: 10pt; font-family: Trebuchet MS"

/>
</form>

<SCRIPT type="text/javascript">
var MAINFORMValidator = new Validator("MAINFORM");
MAINFORMValidator.addValidation("uploadedfile","req","Please select the file to upload.");
</script>

</body>

</html>


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)