在 Watir 中创建新窗口
我是新来的。我正在尝试创建新的 ie 窗口,
browser = Watir::Browser.new
但它给出了错误消息,就像
`user_is_bewildered': Error in the default values: :browser's value must be one of 'ie', 'firefox', or 'safari', and '' doesn't look right. (StandardError)
我不知道如何设置默认浏览器一样。有人可以帮助我吗? 此处还有另一个线程。但我无法理解我需要在 ffi 做什么。
谢谢
I am new to watir. I am trying to create new ie window with
browser = Watir::Browser.new
but it gives error message like
`user_is_bewildered': Error in the default values: :browser's value must be one of 'ie', 'firefox', or 'safari', and '' doesn't look right. (StandardError)
I donno how to set default browser. Can some one help me? There is a another thread here. But I am not able to understand what i need to do in ffi.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果这是原始的 Watir gem,那么以下是我用来启动它的方式:
IamChuckB 的答案可能是一种更有效的方法,但我不确定是否使用过它。
If this is the original Watir gem, then the following is how I used to launch it:
IamChuckB's answer may be a more efficient way of doing this, but having not used it, I'm not sure.
您需要告诉它要打开哪个浏览器。试试这个:
自从我上一份工作以来,我就没有玩过 watir,所以我必须查一下这个。我上次记得,WATIR 并未与 FireWATIR(基于 Firefox 的变体)完全集成。很高兴看到两人同时显然已经和解了。
摘自五分钟内的瓦提尔 在 Zeljko Filipin 的 github 上,顺便说一句。
You need to tell it which browser to open. Try this:
I haven't played around with watir since my last job so I had to look this up. As I last recall, WATIR was not entirely integrated with FireWATIR (the Firefox based variant). It's good to see that the two have apparently been reconciled in the meantime.
Taken from Watir in Five Minutes on Zeljko Filipin's github, BTW.
要安装 devkit,
现在打开命令提示符再次安装 gem
To install devkit,
now open a command prompt to install the gem again
问题已解决。感谢您的投入。问题是 nokorigi gem 安装错误,最初我安装了 x86-mswin32-60,我卸载了它并尝试使用 x86-mingw32,它解决了。
The issue is resolved. Thanx for the the inputs. The issue was with wrong nokorigi gem installation, initially i installed x86-mswin32-60, i uninstalled it and tried with x86-mingw32, it solved.