I'm working with send_keys where I have to hit Enter
@ie.element(:css, "#accountSwitcherSelect.dijitDownArrowButton").send_keys :enter
which makes another object that switches accounts visible
@ie.div(:id => "accountSwitcherSelect_dropdown").table(:id => "accountSwitcherSelect_menu")
Here's the kicker, it works perfectly if I'm there, and the browser is in focus in the foreground.
But, if I either a) lock the Windows OS screen, or b) are working on a Remote Desktop and switch out of RDP, or c) started running the ruby script from a scheduled task on an unattended machine it will see the first dropdown just fine
puts @ie.element(:css, "#accountSwitcherSelect.dijitDownArrowButton").visible?
but it never does send_keys :enter and never will see "accountSwitcherSelect_menu" and throws
timed out after 60 seconds
error
watir 6.10.3, ruby 2.2.5, Windows OS, IE 11
--Here's the full error message, where line 125 is
@ie.element(:css, "#accountSwitcherSelect.dijitDownArrowButton").send_keys :enter
C:/ruby225/lib/ruby/gems/2.2.0/gems/rautomation-0.17.0/lib/rautomation/wait_helper.rb:20:in
wait_until': timed out after 60 seconds (RAutomation::WaitHelper::TimeoutError) from C:/ruby225/lib/ruby/gems/2.2.0/gems/rautomation-0.17.0/lib/rautomation/adapter/win_32/window.rb:153:in
block in send_keys' from C:/ruby225/lib/ruby/gems/2.2.0/gems/rautomation-0.17.0/lib/rautomation/adapter/win_32/window.rb:152:ineach' from C:/ruby225/lib/ruby/gems/2.2.0/gems/rautomation-0.17.0/lib/rautomation/adapter/win_32/window.rb:152:in
send_keys' from C:/ruby225/lib/ruby/gems/2.2.0/gems/rautomation-0.17.0/lib/rautomation/window.rb:192:insend_keys' from C:/ruby225/lib/ruby/gems/2.2.0/gems/watir-classic-4.3.0/lib/watir-classic/browser.rb:452:in
send_keys ' from C:/ruby225/lib/ruby/gems/2.2.0/gems/watir-classic-4.3.0/lib/watir-classic/element.rb:124:insend_keys ' from DeleteTriggers8.rb:125:in
block in ' from DeleteTriggers8.rb:106:ineach' from DeleteTriggers8.rb:106:in
'
rautomation-0.17.0/
is in watir-classic which has already been deprecated. - Rajagopalan