So i'm trying to automate a desktop app using winium and i want to automate the launching of the winium driver thru script, so far i'm able to start it just fine, but when it comes to closing it, that's the problem.
winium = Thread.new{
system (
File.dirname(__FILE__)
+'/Features/Support/support/Winium.Desktop.Driver.exe')
}
sleep 5
winium.kill
But after i kill the thread, if i check with TCPView i can see that winium is still open, this will cause issues if i try to running the script multiple times without winium closing correctly.. My question is how can i make sure that Winium is stopping after i kill the thread?
i'm working in rubyMine, with ruby 2.4.4 and using the 1.6.0 version of the winium driver.
I found a solution to this, i passed the taskkill command to the console with the image name for winium and did a forceful exec and that does the trick.
system ('taskkill /IM Winium.Desktop.Driver.exe /f')