accessrichard / autoitx4java

Automatically exported from code.google.com/p/autoitx4java
39 stars 24 forks source link

send("{DOWN}") or send("{ENTER}") not working #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. in my webpage there is download popup I need to handle.(you can try any 
download popup)
2.I am using following code to handle
public class WindowsUtility{

    private static void setJacoblibrary()
    {
        System.setProperty(LibraryLoader.JACOB_DLL_PATH, System.getProperty("user.dir")+"\\tools\\autoit\\jacob-1.18-M2-x64.dll");
    }
public  static boolean downloadfile(String strTitle)//,String filePath,String 
browserName)
    {
        setJacoblibrary();
        AutoItX x = new AutoItX();
        x.winActivate(strTitle);
        x.winWaitActive(strTitle);
        x.sleep(1000);
        x.
        x.send("{DOWN}");
        x.sleep(1000);
        x.send("{ENTER}");
        return false;

    }

3. I am passing the popup name in string but it is not working

What is the expected output? What do you see instead?
It should press down then enter and file should get download but not happening 
. but my test case is also not failing

What version of the product are you using? On what operating system?
2003-2014

Please provide any additional information below.

Original issue reported on code.google.com by nefree18...@gmail.com on 2 Jun 2015 at 9:32

GoogleCodeExporter commented 9 years ago
Same Problem here.

x.send("{SPACE}") writes the string {SPACE} into an editor
x.controlSend(notepad, "", "", "{SPACE}") does nothing

Original comment by PaVisKa...@googlemail.com on 24 Jul 2015 at 7:44

MRDcoder commented 7 years ago

please use it as x.send("{SPACE}", false);

Subroid commented 6 years ago

try x.send("{SPACE}") instead of x.send("{ENTER}")