Skip to main content

Winium - Windows application automation [Java based and .Net based application]

Winium.Desktop is an open source test automation tool for automated testing of Windows application based on WinForms and WPF platforms.


Requirements

  • Microsoft .NET Framework 4.5.1

Quick Start

  1. 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:
  1. # 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
  2. Start Winium.Desktop.Driver.exe (download release from github or build it yourself)
  3. Run your tests and watch the magic happening

How it works

Winium.Desktop.Driver implements Selenium Remote WebDriver and listens for JsonWireProtocol commands. It is responsible for automation of app under test using Winium.Cruciatus.

Contributing

Contributions are welcome!
  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. Fork the repository to start making your changes to the master branch (or branch off of it).
  3. We recommend to write a test which shows that the bug was fixed or that the feature works as expected.
  4. Send a pull request and bug the maintainer until it gets merged and published. ðŸ˜ƒ

Contact

Have some questions? Found a bug? Create new issue or contact us at g.golovin@2gis.ru

License

Winium is released under the MPL 2.0 license. See LICENSE for details.







                                           https://www.youtube.com/watch?v=s9HTCMhuLwM


Inspect Download - https://github.com/yinkaisheng/Python-UIAutomation-for-Windows/tree/master/inspect

Comments

Popular posts from this blog

Python - PyQt5 set Background image

import sys from PyQt5.QtCore import QSize from PyQt5.QtGui import QImage, QPalette, QBrush from PyQt5.QtWidgets import * class MainWindow ( QWidget ): def __init__ ( self ): QWidget. __init__ ( self ) self .setGeometry( 100 , 100 , 300 , 200 ) oImage = QImage( "test.jpg" ) sImage = oImage.scaled(QSize( 300 , 200 )) # resize Image to widgets size palette = QPalette() palette.setBrush( 10 , QBrush(sImage)) # 10 = Windowrole self .setPalette(palette) self .show() if __name__ == "__main__" : app = QApplication(sys.argv) oMainwindow = MainWindow() sys.exit(app.exec_())

pymsgbox - python package for message box

#This tutorial for to get a confirmation from the user by promting window #Python package "pymsgbox" needs to be install before run this below code #To install "pymsgbox" package go to command prompt and type in "PIP3 INSTALL pymsgbox" import pymsgbox #Displays a message box with OK and Cancel buttons. Number and text of buttons can be customized. Returns the text of the button clicked on. replyV = pymsgbox.confirm( text = 'Please login your application and click on on okay' , title = 'Login Confirmation' , buttons =[ 'OK' , 'Cancel' ]) print (replyV) #Displays a simple message box with text and a single OK button. Returns the text of the button clicked on. replyV = pymsgbox.alert( text = '' , title = '' , button = 'OK' ) print (replyV) #Displays a message box with text input, and OK & Cancel buttons. Returns the text entered, or None if Cancel was clicked. replyV1 = pyms