我有一个特殊的列表框,我可以通过发送向下箭头并按Enter键来自动化.
我可以像这样输入:
listbox_example = find(input, "listbox-example")
listbox-example.set("stuff")
#down arrow command goes here
listbox-example.native.send_keys :return
Run Code Online (Sandbox Code Playgroud)
如何编写向下箭头命令?
我正在浏览Yabe教程.
我已经写了一些测试,他们在经过一些修补之后就开始工作了.在完成教程的过程中,我停止了Play服务器,重新启动,当我转到http:// localhost:9000/@测试时, 我看到以下内容......
Not found
GET /@tests
These routes have been tried, in this order :
GET /@documentation/cheatsheet/{category} PlayDocumentation.cheatSheet
GET /@documentation/modules/{module}/files/{name} PlayDocumentation.file
GET /@documentation/modules/{module}/images/{name} PlayDocumentation.image
GET /@documentation/modules/{module}/{id} PlayDocumentation.page
GET /@documentation/files/{name} PlayDocumentation.file
GET /@documentation/images/{name} PlayDocumentation.image
GET /@documentation/{id} PlayDocumentation.page
GET /@documentation/? PlayDocumentation.index
GET / Application.index
GET /favicon.ico 404
GET /public/ staticDir:public
* /{controller}/{action} {controller}.{action}
Run Code Online (Sandbox Code Playgroud) 我正在使用Yabe教程中的标签,并且遇到了我的initial-data.yml问题
我已经确认它与样品版本相似,只是停止复制和粘贴.
这就是我所看到的
Malformed YAML
Cannot parse the /conf/initial-data.yml file: found character '\t' that cannot start any token
In /conf/initial-data.yml (around line 15)
11: password: secret
12: fullname: Jeff
13:
14: Tag(play):
15: name: Play
16:
17: Tag(architecture):
18: name: Architecture
19:
20: Tag(test):
21: name: Test
Run Code Online (Sandbox Code Playgroud)
这是我的yml
User(bob):
email: bob@gmail.com
password: secret
fullname: Bob
isAdmin: true
User(jeff):
email: jeff@gmail.com
password: secret
fullname: Jeff
Tag(play):
name: Play
Tag(architecture):
name: Architecture
Tag(test):
name: Test
Tag(mvc):
name: MVC
Post(firstBobPost):
title: About the …Run Code Online (Sandbox Code Playgroud) 我试图访问的iframe是3个iframe深,并且模糊启动
<iframe frameborder="0" style="height: 100%; width: 100%;" src="javascript:void(0)"></iframe>
Run Code Online (Sandbox Code Playgroud)
没有ID,名称或价值.
我可以做...
within_frame(iframe)
Run Code Online (Sandbox Code Playgroud) 我遇到了动态ID问题.attach_file命令需要输入type ="file"的id名称.问题是id是动态的
(id="document_22") #indicating the 22nd document uploaded to this section.
Run Code Online (Sandbox Code Playgroud)
有没有办法获得元素的id?就像是...
attach_file(find(:xpath, ".//input[@name='file_upload']").get('@id'),
'C:\\Users\\testbox\\Documents\\testdoc.xls')
Run Code Online (Sandbox Code Playgroud) 我无法运行Play:
C:\Dev\play-1.2.2>play run \dev\myFirstApp
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~
~ play! 1.2.2, http://www.playframework.org
~
~ Ctrl+C to stop
~
Could not execute the java executable, please make sure the JAVA_HOME environmen
t variable is set properly (the java executable should reside at JAVA_HOME/bin/j
ava).
C:\Dev\play-1.2.2>
Run Code Online (Sandbox Code Playgroud)
但是我将环境变量设置如下:
C:\Dev\play-1.2.2>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Owner\AppData\Roaming
asl.log=Destination=file
...
\JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_17\bin
LOCALAPPDATA=C:\Users\Owner\AppData\Local …Run Code Online (Sandbox Code Playgroud) 我在Chrome和Firefox中运行良好的测试在IE9中显得片状或眨眼.我理解基于java的修复程序正在设置一个功能
caps.setCapability("requireWindowFocus", true);
Run Code Online (Sandbox Code Playgroud)
我在env.rb中解释了一个粗略的红宝石尝试......
Capybara.default_driver = :selenium
Capybara.register_driver :selenium do |app|
case get_browser
when 'ie'
caps = Selenium::WebDriver::Remote::Capabilities.internet_explorer
caps.setCapability("requireWindowFocus", true)
Capybara::Selenium::Driver.new(app, :browser => :internet_explorer, :desired_capabilities => caps)
else
Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
end
Run Code Online (Sandbox Code Playgroud)
并发现以下nomethod错误
NoMethodError: undefined method `setCapability' for #<Selenium::WebDriver::Remote::Capabilities:0x3e9b218>
Run Code Online (Sandbox Code Playgroud)
非常感谢ruby修复此问题.