我在fancybox弹出窗口中有表格。当我尝试填写表单详细信息时,出现以下错误。我无法访问fancybox 弹出窗口中的表单元素。
Exception thrown by (//html/.//input[./@type = 'submit' or ./@type = 'image' or ./@type = 'button'][(((./@id = 'Save and Continue' or ./@name = 'Save and Continue') or contains(./@value, 'Save and Continue')) or contains(./@title, 'Save and Continue'))] | .//input[./@type = 'image'][contains(./@alt, 'Save and Continue')] | .//button[((((./@id = 'Save and Continue' or ./@name = 'Save and Continue') or contains(./@value, 'Save and Continue')) or contains(normalize-space(string(.)), 'Save and Continue')) or contains(./@title, 'Save and Continue'))] | .//input[./@type = 'image'][contains(./@alt, 'Save and Continue')] | .//*[./@role = 'button'][(((./@id = 'Save and Continue' or ./@name = 'Save and Continue') or contains(./@value, 'Save and Continue')) or contains(./@title, 'Save and Continue') or contains(normalize-space(string(.)), 'Save and Continue'))])[1]
Element must be displayed to click (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 56 milliseconds
Build info: version: '2.31.0', revision: '1bd294d', time: '2013-02-27 20:52:59'
System info: os.name: 'Windows Server 2008 R2', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_35'
Session ID: 94981d491c84e0b138854cffe68a2533
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, chrome.chromedriverVersion=26.0.1383.0, acceptSslCerts=false, javascriptEnabled=true, browserName=chrome, rotatable=false, locationContextEnabled=false, version=27.0.1453.110, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true, webStorageEnabled=true, applicationCacheEnabled=false, takesScreenshot=true}]
我正在使用来自http://fancybox.net/的jQuery FancyBox 插件,并查看以下函数定义和场景
测试场景:
Scenario: I can able to invite my friend to femqueen.com
Given I have a femqueen account
And I am logged in
And I can see "Invite Friends"
And I press "Invite Friends"
And I should see "Invite your friends to femqueen.com" in the popup
Then I fill "from" with "fmq@gmail.com"
And I fill "to" with "rams@gmail.com"
And I fill "message" with "some message"
And I press "Invite"
函数定义:
/**
* @When /^I fill "([^"]*)" with "([^"]*)"$/
*/
public function iFillWith($field, $value)
{
return new Step\Given("I fill in \"$field\" with \"$value\"");
}
你可以在这里看到我的fancybox html代码http://pastebin.com/zeZDXhm9