Jump to content

scripting164

Members
  • Posts

    2
  • Joined

  • Last visited

scripting164's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Now I am able to pass value.. There was small mistake in calling java program.. It should have been: Process proc1 = Runtime.getRuntime().exec( "uploadfile3.exe cmd"); But now I am facing another issue. Since I have to pass value multiple times in the program, exe holds the previous value on first call and changes to the desired value on second call. Any idea how it can be solved??
  2. Hii, I am using selenium rc with java and trying to upload file for test using autoit. I am able to do the same, but I have to write a new script for each file to be uploaded for different scenarios. Is there any way to pass file name as a parameter to the script, so that I can use only one script file. I tried this but it gives Error: Array variable has incorrect number of subscript Here is my script upload.au3: #include<IE.au3> If $CmdLine[0] < 2 Then WinWait("Choose File to Upload") $hChoose = WinGetHandle("Choose File to Upload") ControlSetText($hChoose, "", "[CLASS:Edit; INSTANCE:1]",$CmdLine[1]) sleep(2000) ControlClick($hChoose, "", "[CLASS:Button; INSTANCE:1]") EndIf And I am calling from java as below: _selenium.click("id=movie-path"); String[] cmd = {path_to_file }; Process proc1 = Runtime.getRuntime().exec( "uploadfile3.exe",cmd); Help needed...
×
×
  • Create New...