You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to open outlook using winAppDriver and ruby.
For this, I use this code:
def self.setup
opts =
{
url: "http://127.0.0.1:4723/wd/hub",
desired_capabilities:
{
platformName: "WINDOWS",
platform: "WINDOWS",
deviceName: "WindowsPC",
app: 'C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE'
},
appium_lib:
{
wait_timeout: 30,
wait_interval: 0.5
}
}
@core = Appium::Core.for(opts)
@outlookSession = @core.start_driver
@current_window_handler = @outlookSession.window_handle
for $attempt in 0..5
if $attempt < 6
puts $attempt
sleep(10 * $attempt)
@WindowHandles = @outlookSession.window_handles;
puts @WindowHandles
begin
@outlookSession.switch_to.window(@WindowHandles[0])
if @outlookSession.find_elements(:name, "New Email")[0] != nil
break
end
rescue
RuntimeError
puts "Runtime error encountered and rescued."
end
end
end
@outlookSession.manage.window.maximize
@outlookSession
The code works fine if the app is in the background but fails if the app is closed with the following error: Selenium::WebDriver::Error::NoSuchWindowError:
From console I get the following logs:
try 0
Windows handeler 0x002409B2
Runtime error encountered and rescued.
try 1
Runtime error encountered and rescued.
try 2
Runtime error encountered and rescued.
try 3
Runtime error encountered and rescued.
try 4
Runtime error encountered and rescued.
try 5
Runtime error encountered and rescued
So it seems that for all the tries except the first one my windows handlers are empty.
I have looked into this issue when I tried to implement this code. #611
Do I do something wrong? Any suggestion or help is appreciated.
The text was updated successfully, but these errors were encountered:
Hello,
I have been trying to open outlook using winAppDriver and ruby.
For this, I use this code:
The code works fine if the app is in the background but fails if the app is closed with the following error:
Selenium::WebDriver::Error::NoSuchWindowError:
So it seems that for all the tries except the first one my windows handlers are empty.
I have looked into this issue when I tried to implement this code. #611
Do I do something wrong? Any suggestion or help is appreciated.
The text was updated successfully, but these errors were encountered: