Watij 在WINDOWS 7 能使用吗?

Are you using the old api or the new WebSpec api? WebSpec works fine on Win7 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 onWin764bit, 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 Windows7. Wrote following code

@Test
public void testRun()
{
Spec spec = new Spec().safari();
spec.open("http://www.google.com");
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.com/'").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:35pm, chribuhhh <chribu...@googlemail.com> wrote:



Brian Knorr
View profile
More optionsNov 7 2010, 8:20am
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 Windows7(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:13pm, Anamika T


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






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值