Winium.Desktop | Selenium Remote WebDriver implementation | Functional Testing library
kandi X-RAY | Winium.Desktop Summary
kandi X-RAY | Winium.Desktop Summary
English description | Описание на русском.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Winium.Desktop
Winium.Desktop Key Features
Winium.Desktop Examples and Code Snippets
Community Discussions
Trending Discussions on Winium.Desktop
QUESTION
I need to write windows app automation script using winium with JavaScript. I've done this using Java as lots of help and material is available for references. But I need to do the same in JavaScript and I don't know the equivalent APIs of winium in JavaScript binding.
Constraints below -
Tool of choice - winium
Language of choice - JavaScript
Application - any Windows app like. Notepad
...ANSWER
Answered 2020-Apr-10 at 06:40Well here's how i was able to do it with JS (selenium + winium.desktop.driver). Hope this will be useful.
- Keep Winium.Desktop.Driver instance running on port (9999 default) and use the same address in the capability while building the service.
- Create selenium instance over the winium server using the builder API.
- Use default APIs from winium to interact with the windows application.
Note : In case you get following error consider downgrading the selenium-webdriver to 2.45.0.
Error - UnsupportedOperationError: 'css selector' is not valid or implemented searching strategy.
Code snippet :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Winium.Desktop
Write your tests using you favorite language. In your tests use app desired capability to set path to tested app's exe file. Here is python example: # put it in setUp self.driver = webdriver.Remote(command_executor='http://localhost:9999', desired_capabilities={'app': 'C:\\testApp.exe', 'args': '-port 345'}) # put it in test method body win = self.driver.find_element_by_id('WpfTestApplicationMainWindow') win.find_element_by_id('SetTextButton').click() assert 'CARAMBA' == self.driver.find_element_by_id('MyTextBox').text
Start Winium.Desktop.Driver.exe (download release from github or build it yourself)
Run your tests and watch the magic happening
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page