ruby で Selenium を介してドロップダウンと送信ボックスを処理するのに本当に苦労しています。私はこれに行き着き、他の多くのオプションを試しました:
mySelect = browser.find_element(:id, "bulk_action")
option = mySelect.find_element(:css, "option[value='Accepted']")
応答:
[remote server] file:///var/folders/tt/pbz121011d1fvj5xmbyg78y00000gn/T/webdriver-profile20151012-46016-5sf82y/extensions/fxdriver@googlecode.com/components/driver-component.js:10659:in `FirefoxDriver.prototype.findElementInternal_': Unable to locate element: {"method":"id","selector":"bulk_action"} (Selenium::WebDriver::Error::NoSuchElementError)
from [remote server] file:///var/folders/tt/pbz121011d1fvj5xmbyg78y00000gn/T/webdriver-profile20151012-46016-5sf82y/extensions/fxdriver@googlecode.com/components/driver-component.js:10668:in `FirefoxDriver.prototype.findElement'
from [remote server] file:///var/folders/tt/pbz121011d1fvj5xmbyg78y00000gn/T/webdriver-profile20151012-46016-5sf82y/extensions/fxdriver@googlecode.com/components/command-processor.js:12534:in `DelayedCommand.prototype.executeInternal_/h'
from [remote server] file:///var/folders/tt/pbz121011d1fvj5xmbyg78y00000gn/T/webdriver-profile20151012-46016-5sf82y/extensions/fxdriver@googlecode.com/components/command-processor.js:12539:in `DelayedCommand.prototype.executeInternal_'
from [remote server] file:///var/folders/tt/pbz121011d1fvj5xmbyg78y00000gn/T/webdriver-profile20151012-46016-5sf82y/extensions/fxdriver@googlecode.com/components/command-processor.js:12481:in `DelayedCommand.prototype.execute/<'
from /Users/chris/.rvm/gems/ruby-2.2.3/gems/selenium-webdriver-2.48.0/lib/selenium/webdriver/remote/response.rb:70:in `assert_ok'
from /Users/chris/.rvm/gems/ruby-2.2.3/gems/selenium-webdriver-2.48.0/lib/selenium/webdriver/remote/response.rb:34:in `initialize'
from /Users/chris/.rvm/gems/ruby-2.2.3/gems/selenium-webdriver-2.48.0/lib/selenium/webdriver/remote/http/common.rb:78:in `new'
from /Users/chris/.rvm/gems/ruby-2.2.3/gems/selenium-webdriver-2.48.0/lib/selenium/webdriver/remote/http/common.rb:78:in `create_response'
from /Users/chris/.rvm/gems/ruby-2.2.3/gems/selenium-webdriver-2.48.0/lib/selenium/webdriver/remote/http/default.rb:90:in `request'
from /Users/chris/.rvm/gems/ruby-2.2.3/gems/selenium-webdriver-2.48.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
from /Users/chris/.rvm/gems/ruby-2.2.3/gems/selenium-webdriver-2.48.0/lib/selenium/webdriver/remote/bridge.rb:664:in `raw_execute'
from /Users/chris/.rvm/gems/ruby-2.2.3/gems/selenium-webdriver-2.48.0/lib/selenium/webdriver/remote/bridge.rb:642:in `execute'
from /Users/chris/.rvm/gems/ruby-2.2.3/gems/selenium-webdriver-2.48.0/lib/selenium/webdriver/remote/bridge.rb:611:in `find_element_by'
from /Users/chris/.rvm/gems/ruby-2.2.3/gems/selenium-webdriver-2.48.0/lib/selenium/webdriver/common/search_context.rb:61:in `find_element'
from mass_assign.rb:23:in `<main>'
オプションを選択して送信ボタンから送信する方法について何か考えはありますか?