最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

Watij 在WINDOWS 7 能使用吗?

业界 admin 15浏览 0评论
Are you using the old api or the new WebSpec api?  WebSpec works fine  on  Win 7  X 64. 


Two solutions. Best solution, switch to WebSpec API as the old version 
of Watij (3.2.1) is being replaced with WebSpec. 

Alternative solution, run in 32-bit mode. I have not tried it but two 
thoughts come to mind. The first is that Java has a switch (-D32 I 
think) to make 64-bit Java run in 32 bit mode. This might trick Watij 
into using the 64-bit DLL. The other option is to create a shortcut 
and set it to run in 32-bit mode (might be called Compatibility mode). 
If you run things from the shortcut it should be totally 32 bit and 
work fine. From the command line you can use the RUNAS.EXE to set the 
mode. 



Watij (the old API) works fine on Win 7 64bit, too. Just make sure to 
use a 32bit java version. (Otherwise a 64bit jni dll is missing) 


Hi, 
    I'm facing same problem. I installed Watij (webspec_1.0.1_beta) 
today on Windows 7. Wrote following code 

@Test 
        public void testRun() 
        { 
        Spec spec = new Spec().safari(); 
        spec.open("http://www.google"); 
        spec.find("input").with("name=='q'").set("value='Watij'"); 
        spec.find("input").with("type=='button'").with("value=='Google 
Search'").click(); 
        //check results 
        spec.find("a").with("href=='http://watij/'").shouldExist(); 
        } 

but it throws exception of 

java.lang.ExceptionInInitializerError 
Caused by: com.jniwrapper.LibraryNotFoundException: Cannot find 
JNIWrapper native library (jniwrap64.dll) 

I tried few things but no use. I'm not sure what's missing. 

Any direction is appreciated, 
Thanks, 
Anu 

On Sep 22, 11:35 pm, chribuhhh <chribu...@googlemail> wrote: 



   
Brian Knorr  
View profile  
 More options Nov 7 2010, 8:20 am
Yes for the WebSpec API on windows 64 you have to use 32 bit java sdk. 

The old Watij api works with IE on Windows.  Watij's new WebSpec api 
works with IE and Mozilla on Windows, Safari and Mozilla on Mac, and 
Mozilla on Linux.  For Windows 7 (64bit) make sure you are using a 
32bit Java SDK.  On Mac you just have to pass in -d32 in your VM args 
to force 32bit Java execution. 

On Nov 8, 1:13 pm, Anamika T 


I have used Watij with IE7 and IE8. No problems at all. It does not 
work on x64 systems however. 






Are you using the old api or the new WebSpec api?  WebSpec works fine  on  Win 7  X 64. 


Two solutions. Best solution, switch to WebSpec API as the old version 
of Watij (3.2.1) is being replaced with WebSpec. 

Alternative solution, run in 32-bit mode. I have not tried it but two 
thoughts come to mind. The first is that Java has a switch (-D32 I 
think) to make 64-bit Java run in 32 bit mode. This might trick Watij 
into using the 64-bit DLL. The other option is to create a shortcut 
and set it to run in 32-bit mode (might be called Compatibility mode). 
If you run things from the shortcut it should be totally 32 bit and 
work fine. From the command line you can use the RUNAS.EXE to set the 
mode. 



Watij (the old API) works fine on Win 7 64bit, too. Just make sure to 
use a 32bit java version. (Otherwise a 64bit jni dll is missing) 


Hi, 
    I'm facing same problem. I installed Watij (webspec_1.0.1_beta) 
today on Windows 7. Wrote following code 

@Test 
        public void testRun() 
        { 
        Spec spec = new Spec().safari(); 
        spec.open("http://www.google"); 
        spec.find("input").with("name=='q'").set("value='Watij'"); 
        spec.find("input").with("type=='button'").with("value=='Google 
Search'").click(); 
        //check results 
        spec.find("a").with("href=='http://watij/'").shouldExist(); 
        } 

but it throws exception of 

java.lang.ExceptionInInitializerError 
Caused by: com.jniwrapper.LibraryNotFoundException: Cannot find 
JNIWrapper native library (jniwrap64.dll) 

I tried few things but no use. I'm not sure what's missing. 

Any direction is appreciated, 
Thanks, 
Anu 

On Sep 22, 11:35 pm, chribuhhh <chribu...@googlemail> wrote: 



   
Brian Knorr  
View profile  
 More options Nov 7 2010, 8:20 am
Yes for the WebSpec API on windows 64 you have to use 32 bit java sdk. 

The old Watij api works with IE on Windows.  Watij's new WebSpec api 
works with IE and Mozilla on Windows, Safari and Mozilla on Mac, and 
Mozilla on Linux.  For Windows 7 (64bit) make sure you are using a 
32bit Java SDK.  On Mac you just have to pass in -d32 in your VM args 
to force 32bit Java execution. 

On Nov 8, 1:13 pm, Anamika T 


I have used Watij with IE7 and IE8. No problems at all. It does not 
work on x64 systems however. 






发布评论

评论列表 (0)

  1. 暂无评论