Giter Club home page Giter Club logo

robotframework-flaui's Introduction

Robotframework-FlaUI Library

License
Python Builds (x86)
Python Builds (x64)
Tests
Python python_312
Robotframework
PyPi

Introduction

Robotframework-FlaUI is a keyword based user interface automation testing library for Windows applications like Win32, WinForms, WPF or Store Apps. It's based on the FlaUI user interface automation library.

Installation

Install the latest stable release:

pip install --upgrade robotframework-flaui

Dependencies and python support

The robot framework FlaUI is supposed to support the current Python 3 versions.

Required dependencies

See dependencies from Documentation

Python.Net Wrapper Issues

Robotframework-Flaui 1.x

  • With the release of Python.Net version 2.5.2, Python 3.9 support was implemented for the first time.
  • However, no official support for Python 3.9 has been released yet.
    • For more information see the issue #1389
  • If there are problems installing the Python.Net library, please use Python 3.8 instead.
  • This is only a potential problem by all robotframework-flaui 1.x versions which are implemented by Python.Net 2.5.2

Robotframework-Flaui 2.x

  • Sometimes an AccessViolationException wil be occure on latest Python.Net Version v3.0.1
    • For more information see the issue #1977
    • A workaround is to set Python's memory allocation environment variable "PYTHONMALLOC=malloc"

Documentation

RFHUB2

RFHUB2 is an opensource project aimed to provide nice and easy way of collecting, browsing and sharing documentation of existing keywords written in RobotFramework and python. Built with Material-UI and FastAPI, served by Uvicorn.

Under docs/keywords are the necessary .XML files to import the keywords.

These can be imported separately according to their version with the RFHUB2-CLI tool or all versions.

rfhub2-cli .\docs\keywords\
rfhub2-cli .\docs\keywords\<VERSION>

GUI Inspector Tools

There are various tools around which help inspecting application that should be ui tested or automated.

Some of them are:

Examples

Examples of use can be found in the atests folder.

Development

Preconditions

  • Install Python, if not already installed.
  • Only Python 3 is supported.
  • Install Robotframework and Python.Net

Dependency installation by Keen.bat

.\keen.bat dependency

Test-Applications

Two test projects were used for the UI automation:

  • FlaUI WPF Test App 'Standard application that contains all common UI elements'
  • Notifier Test App 'Application which closes automatically after a time'

Building and testing locally

Use the provided 'Commander Keen' file:

.\keen.bat test

The script automatically builds the:

  • Library as a wheel file stored in the Dist folder
  • Test documentation located in the Docs folder
  • Automatically installs and runs the robot tests of the library and saves the test results in the Result folder

Following arguments are supported:

.\keen.bat <argument>
  • cleanup - Removes all build folders
  • dependency - Install all python dependencies
  • build - Build wheel file
  • install - Install wheel file
  • test - Test robotframework-flaui (UIA2 and UIA3)
  • test_uia2 - Test UIA2 interface usage
  • test_uia3 - Test UIA3 interface usage
  • pylint - Static code analysis for python code
  • robocop - Static code analysis for robotframework code
  • tidy - Formatter for robotframework code

Acknowledgements

FlaUI

  • Thanks to @Roemer for the passion to create and maintain the FlaUI project.
  • Thanks to FlaUI developers and maintainers for this project.

robotframework-flaui's People

Contributors

dependabot[bot] avatar geogegl avatar jimrevolutionist avatar lilacomputer avatar nepitwin avatar noubar avatar secana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

robotframework-flaui's Issues

Wait Until Element Is Hidden (wrong)

The keyword "Wait Until Element Is Hidden" does not wait until the element is offscreen but waits untill element does not exist anymore.

suggestion:
Rename the keyword to "Wait Until Element Is Gone".
Reimplement the "Wait Until Element Is Hidden" right way.

How to long press a Button from Flaui

I have a keypad which has both number and alphabets , If I long press button 1 it will add A, B or C to dial pad based on the press seconds. Is there any way we can achieve this from FlaUI.

KeyPad

Keyword request "Press Key"

As a tester, I want to have "Press Key" keyword.

we have already a keyword "Press keys" which takes a list of shortcuts as an argument but it is more practical to have one more keyword which just takes one key combination as a shortcut so that we avoid lists of one element.

Tasks to do

  • Implement Press Key
  • Extend Keyboard.robot and ErrorHandling tests
  • Update changelog
  • Update documentation page
  • Pylint is score 10/10
  • Create pullrequest
  • Merge to master

Colons (and possibly other characters) in Test Cases Cause File Path Errors

Summary

Most filesystems recognize the colon character as a path delimiter. For example, here are several reserved characters in Windows file systems, inclusive of the colon character. If a test case has a colon (or, likely any other illegal file/path character), the robotframework-FlaUI library does not escape the character, and thus tries to save screenshots using this as part of the filename.

Example

Assuming we've installed and imported robotframework-flaui, a test case with this name:

Test Case 1234: Something to Test
    [Documentation]    Pretend we're testing something here...
    Log to Console    What's the state of the desktop?
    Take Screenshot

...will cause the library to attempt to create a screenshot with a name like: test_case_1234:_something_to_test.jpg

Issue

The screenshot cannot be successfully created because the colon is an illegal/reserved character.

Some button presses are very slow

For certain buttons, the amount of time to press them is about 5 or more seconds. But other buttons are press in under half a second.
I made this little keyword to check, then click

Click on GUI element
    [Arguments]  ${element}
    Log Many  ${element}
    Wait Until Element Is Visible  ${element}[xPath]
    Click  ${element}[xPath]

This xPath took half a second for the wait, then under a half to press:
"/Window[@name='DevTool']/Tab//Button[@name='Connect']"

Where as this xPath took over 5 seconds to wait, then another 5 seconds to press
"/Window[@name='DevTool']/Tab/Pane//Group[@name='Game Control']/Button[@name='Disable']"

Any idea why this might be happening? These xPaths are in the same window, just under different tabs.
I have something like this:

Attach to application
Switch to tab 1
Click on GUI element   connect button       # 1 second
Switch to tab 2
Click on GUI element   disable button        # 10 seconds 
Switch to tab 1
Click on GUI element  disconnect button   # 1 second

Set Window Visual State Request

Excited to see some new development in this! Thank you. :)

Was wondering if you plan on expanding on the "Window Visual State" keywords to include a Set Window Visual State, so that it can be changed to minimized, maximized, restore, etc.

Keep up the great work.

Retrieve element attributes

Greetings,

Is it possible to gather any element attributes except 'Identification' attributes?

Examples:

  1. Excel: retrieve value from the cell:
    image

  2. Excel: retrieve toggle state from TopAlign button:
    image

  3. Or any other attributes, like: Legacy|Accessible.State, SelectionItem
    image

Documentation improvement about Keyboard keyword documentation

The current docuementation from the Keyboard usage is wrong described.

The example is not clear enough described for this usage.

  • Update the Keyboard documentation
  • Update the changelog
  • Merge to master
  • Update the documentation keyword from the documentation branch

Feature: Return coordinates of bounding rectangle of an element

As far as I could gather from the keyword documentation, there is no possiblity, yet, to determine the bounding rectangle of an element using FlaUILibrary. However, this would be very useful to be able to combine UIA elemet location with other UI automation technologies like image recognition / OCR (e.g. using robotframework-sikulixlibrary). There are applications where you can go only so far via UIA alone (e.g. Delphi based GUI applications).
So the scenario would:

  • Locate an element via XPath using FlaUILibrary and gets its bounding rectangle coordinates
  • Search within this rectangle via image recognition / OCR using other libraries

Keyword which can return the elements State

As a tester, I need a new keyword through which I can read or get the state of the element.

image

But in Inspector I find a State Property through they can be detected if they are enabled or not. Here the property called Unavailable.

[Enhancement] provide a keyword to get_specific_attribute_of_element

@AndreGleichner

No matter what type of element, it owns attributes (like "Name", "IsOffscreen", "ClassName" and so on).

Now, in my case, I need to get the "SelectionItem.IsSelected" attribute of a RadioButton Element to know is it selecetd.

So, I think we can provide a keyword to realize this kind of function in our FlauiLibrary.

pseudocode like below:
def get_specific_attribute_of_element(self, attribute, xpath):
"""
attribute (str) : attribute name string
"""
attribute_switcher = {
"Name": lambda: self._get_element(xpath).Name,
"ClassName": lambda: self._get_element(xpath).ClassName,
"SelectionItem.IsSelected": lambda: self._get_element(xpath).SelectionItem.IsSelected,
......
}
return attribute_switcher .get(attribute)

No such file or directory: 'Readme.md'

i am installing like
pip install -r requirements.txt
and my requirement file is having robotframework-flaui==1.6.4

Collecting robotframework-flaui==1.6.4
Downloading robotframework-flaui-1.6.4.tar.gz (253 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /jenkins/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iuaysvg_/robotframework-flaui/setup.py'"'"'; file='"'"'/tmp/pip-install-iuaysvg_/robotframework-flaui/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-l40mc5hd
cwd: /tmp/pip-install-iuaysvg_/robotframework-flaui/
Complete output (12 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-iuaysvg_/robotframework-flaui/setup.py", line 30, in
with open("Readme.md", "r") as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'Readme.md'

ComboBox Support for index 0

I am facing a strange issue with a 'ComboBox' on my GUI.
If I try Select Combobox Item By Index with index 0, I get this error:
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
If I start at index 1 and go to the end, no problem.

Element Should Exist  ${xPath}
${count} =  Get ComboBox Items Count  ${xPath}
Log  ${count}
FOR  ${i}  IN RANGE  0  ${count}
    Select ComboBox Item By Index  ${xPath}  ${i}
    ${data} =  Get Selected Items From ComboBox  ${xPath}
END

Also, is there a faster/more efficient way to get all the items from a combobox? For my GUI, I am seeing about 600ms per item in the list. The first couple of items take about 1 to 2 seconds each

Possibility to use Relative path for element finding

Hi,
We are checking if RobotFramework-Flaui is suitable for out test developement. Our team have around 1000+ tests in Coded UI and looking to shift to robotframework tests. We are considering the Flaui for test shift and new test development but during PoC we stuck on below issue -

Unable to locate element with Relative XPATH.
We have desktop application which has lot of pane and containers, the elements are located within these panes.
Example:
We are able to locate element with xpath: /Window[@name='XYZ']/Pane[2]/Pane[2]/ComboBox[2]

But this will be hard to maintain the XPATH, will it possible to access these elements with Relative XPATH, something like this -
//ComboBox[@name='abc'] ---> Search element anywhere on screen which is visible with given name ?

Appreciate the help!

[Bug] Facing issues after Switching back to UIA3 from UIA2 using Robotframework-flaui Library (UIA3 xpaths are not getting identified)

The below is our exact scenario.

ISSUE Description: Actually we have a desktop application where we have two different xpaths when we are trying to identify an element through FLAUI Inspect tool in UIA2 and UIA3 Identifiers types. Hence in our case we would like to switch b/w UIA2 and UIA3 while Automating end to end scenario. Also for us IS_READ_ONLY is returning 'True' in UIA2 and 'FALSE' in UIA3. Hence we need to switch B/W UIA2 and UIA3.

==>Able to switch from UIA3 to UIA2 without no issues but we are facing issues when we are again switching back to our original UIA3. Able to switch back to UIA3 from UIA2 but our problem is UIA3 xpaths are not working in this case.

Scenario:isread only
Import Library FlaUILibrary uia=UIA3 screenshot_on_failure=True timeout=0 WITH NAME Custom
Reload Library Custom
importlib.Invalidate Caches
Custom.Attach Application By Pid 27308
#Set Test Variable ${uia1} UIA3
${uia} Custom.Get Uia Identifier
log to console ${uia}
Sleep 3s
${personalid_text} /Window/Window/Window/Window/Pane[1]/Pane/Pane/Edit[5] IS_READ_ONLY
log to console ${personalid_text}
############## We are trying to switch to UIA2 ############################
Import Library FlaUILibrary uia=UIA2 screenshot_on_failure=True timeout=0 WITH NAME UIA2

${uia}    UIA2.Get Uia Identifier   
   log to console     ${uia}   
${personalid_text}       UIA2.Get Property From Element   /Window/Window/Window/Window/Pane[1]/Pane[2]/Edit       IS_READ_ONLY
log to console    ${personalid_text} 
 ############## We are trying to switch back to UIA3 ############################
 # Import Library    FlaUILibrary    uia=UIA3    screenshot_on_failure=True     timeout=0    WITH NAME	UIA3Identifier 
Reload Library    Custom
importlib.Invalidate Caches 
Custom.Attach Application By Pid    27308
#Set Test Variable    ${uia1}    UIA3
${uia}    Custom.Get Uia Identifier   
   log to console     ${uia}  
   Sleep    3s 
${personalid_text}       /Window/Window/Window/Window/Pane[1]/Pane/Pane/Edit[5]    IS_READ_ONLY  #xpath belongs to UIA3 which was working earlier is not working (/Window/Window/Window/Window/Pane[1]/Pane[2]/Edit is working which is UIA2)
log to console    ${personalid_text} 

FlaUI unable to identify the change in Automation ID

Hi,

Thanks for the Support !!!

I am facing issue with the FlaUI with the latest version, I have my application opened already and attaching it to FlaUI with ID.

Getting an error that,

FlaUiError: Element from XPath '//*[@AutomationId="inst1-base-Sales-ringing"]' could not be found, but still it can be found with the FlaUI inspect and the element is visible in the screen. The ID of this button changes dynamically when some actions are triggered.

PFA attached screen shot - In the FlaUI inspect in details changed ID is reflecting , but in the summary it is old ID.

FlaUI_Id_Change

cannot handle pop up window

Describe the bug
I have a desktop application screen that throws an error when you dont provide data as expected, unfortunately I dont see an automation id for this screen but I do see automation Id for a OK button on it.
I want to check in my script if this error pop up occured and I want to fail the test case in case of wrong data. If provided with correct data the pop up wont show and test cases should continue.

I tried 3 keywords:
Is Element Enabled //[@AutomationId='OkButton']
Element should not be Visible //[@AutomationId='OkButton']
Element should not Exist //*[@AutomationId='OkButton']

It does executes well is there is an error pop up coming up but when the data is clean the code fails throwing error Xpath not found or it would hang the project in pycharm and would work only when I restart everything

Code snippets
${ISErrPopupVisible} Is Element Enabled //*[@AutomationId='OkButton']

IF '${ISErrPopupVisible}'=='True'
Fail There is an issue with Input Data
ELSE
Log You have input correct data, please wait for the ouput to be generated
END

False interpretation of None in FlaUILibrary

image
I want to avoid the The false implementation of the timeout Argument given to FLaUILibrary as None:
image
There is two solutions either to Declare the timeout argument as "None" instead of None
image
or to declare 0
image

[Enhancement] add a delay into the end of "Press Key"

Hi, @Nepitwin

Usually, we want to quickly open a program or software via Run(Win+R). So we need to setup such a keyword like picture below.
image

You will see "Sleep 1s" is written after each "Press Key". Because we should avoid next action to be lost for too fast Presskey event.
So, I suggest that add a common delay into the end of "Press Key" will be better. "Press Keys" is same.

problem with simulating ctrl-click

I'm using the library to automate a windows application. I need to select several items in a data grid using ctrl-click. when I use the press keys keyword with 'CTRL+LBUTTON' it doesn't work but in the report it registers as a success . when I tried press keys "LBUTTON" it again didn't click but registers as success.
I'm using windows 10, python 3.8

is there another way to preform ctrl+click on an element?

Facing issue using 'Expand TreeItem' with multiple items.

ISSUE Description:
I'm working on a WPF application that use DevExpress library.
Sometimes and inside tree taht contain multiple treeitems (10000 items) an exception will be retrieved from the 'Expand TreeItem' function:

Full Name: Test.Expand Folder10
Start / End / Elapsed: 20230802 17:55:48.422 / 20230802 17:56:11.477 / 00:00:23.055
Status: FAIL
FlaUiError: Incorrect syntax usage 'self.current_treeitem.Expand()'

Test code:
${IODataServerTreeItem} /Window[@name="xxxx"]/Group[@AutomationId="dockingManager"]/Group[@AutomationId="rootLayoutGroup"]/Tab/Group[@AutomationId="UFProjectExplorerUIControl_Panel"]/Custom[@AutomationId="UFProjectExplorerUIControl"]/Tree/Pane[@AutomationId="dataPresenter"]/TreeItem[@name="I/O Data Server"]

${folder1TreeItem} /Window[@name="xxxx"]/Group[@AutomationId="dockingManager"]/Group[@AutomationId="rootLayoutGroup"]/Group/Tab/Group[@AutomationId="I_O_Data_Server__emptyProject__Panel"]/Custom/Tab/TabItem[@AutomationId="DXTabItemtabAddressSpace"]/Custom/Tab/TabItem[@AutomationId="DXTabItemtreeListTab"]/Tree/Pane[@AutomationId="dataPresenter"]

Expand Folder10
FlaUILibrary.Double Click ${IODataServerTreeItem}
FlaUILibrary.Wait Until Element Is Visible ${folder1TreeItem} 10 Element Not Loaded
FlaUILibrary.Expand Treeitem ${folder1TreeItem} N:folder_10
FlaUILibrary.Wait Until Element Is Visible ${folder1Variable2TreeItem} 10 Element Not Loaded
FlaUILibrary.Select Treeitem ${folder1TreeItem} N:variable_02
FlaUILibrary.Collapse Treeitem ${folder1TreeItem} N:folder_10
FlaUILibrary.Click ${addressSpaceTabCloseButton}

Anyone facing this kind of issue?

Add argument parameter for Launch Application process keyword

Current Launch Application does not support arguments usage.
This missing attribute should be extend to this keyword.

Tasks to do

  • Extend Launch Application Keyword with Arguments usage
  • Extends tests
  • Update changelog
  • Update documentation
  • Pylint score 10/10
  • Create pullrequest
  • Merge to master

Compatibility with Robot Framework 3.2.2

Latest stable release of RF is 3.2.2,
but requirements.txt states "robotframework>=3.0.4,<=3.2.1".
Is there a specific reason for the constraint, or can requirements.txt be updated to include 3.2.2?

Pythonnet 3.0 support

Pythonnet 3.0 alpha versions are in pre alpha channels.
This version should officially support python 3.9.

  • Verify if pythonnet alpha version works by current robotframework-flaui
  • Migrate all issues

Keyword Mouse Drag and Drop

Would it be possible to get a Mouse Drag/Drop keywords? I'm willing to contribute, but I'll need lots of guidance as I haven't learned Python or how RobotFramework works under the hood.

Error Handling by Robotframework 5

Robotframework 5 (https://github.com/robotframework/robotframework/releases/tag/v5.0a1) contains now a try except block.
Currently all keywords are implemented to handle error messages internally by robotframework-flaui
By these code changes all keywords can be used by an internal try except block and handle errors individually.

Full release notes https://github.com/robotframework/robotframework/blob/master/doc/releasenotes/rf-5.0a1.rst

Sample code by robotframework 5

    TRY
        Some Keyword
    EXCEPT    Error message    # Try matching this first.
        Error Handler 1
    EXCEPT    Another error    # Try this if above did not match.
        Error Handler 2
    EXCEPT    ${message}       # Last match attempt, this time using a variable.
        Error Handler 3
    END

For this case it would be nice to extend robotframework-flaui by these type of code handling.
For fallback usage developer should be decide if error handling should be used as old message style or as except.

  • Enable Flaui Exception Handling
  • Disable FlaUi Exception Handling

By these two type of keywords user can decide the new approach or to use old robotframework 4 usage

    Enable Flaui Exception Handling
    TRY
        Some Keyword
    EXCEPT    Error message    # Try matching this first.
        Error Handler 1
    EXCEPT    Another error    # Try this if above did not match.
        Error Handler 2
    EXCEPT    ${message}       # Last match attempt, this time using a variable.
        Error Handler 3
    END
    Disable FlaUi Exception Handling

Python 3.10.x compatibility

Hello.
When a version compatible with Python 3.10.x will be released?

Thanks for your support.

Trying to install v1.7.3 i get the following error:

**Collecting robotframework-flaui
Using cached robotframework-flaui-1.7.3.tar.gz (255 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-58slm_8v\robotframework-flaui_4ced249a34f245c5bad49df92693aa4f\setup.py", line 34, in
with open("requirements.txt", "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
---------------------Branch Informations---------------------
Release: False
APPVEYOR_REPO_TAG: false
APPVEYOR_REPO_TAG_NAME: 0
APPVEYOR_BUILD_VERSION: 0
APPVEYOR_BUILD_NUMBER: 0
-------------------------------------------------------------
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.**

Robotframework could not be installed by Python 3.8.5

Hello,
I would have been interested to try out your rf-library for flaui as White as been deprecated. However, I cannot do so because there is no way to install it.
At least I have not found a way to install it successfully. If I pip install, I end up with a long list of error messages:

C:\Users\tuosil\Desktop\kurssikansio\RF_Extended>pip install -U robotframework-flaui
Collecting robotframework-flaui
  Using cached robotframework_flaui-1.3.2-py3-none-any.whl (236 kB)
Collecting pythonnet==2.4.0
  Using cached pythonnet-2.4.0.tar.gz (1.8 MB)
Requirement already satisfied, skipping upgrade: wheel==0.34.2 in c:\python38\lib\site-packages (from robotframework-flaui) (0.34.2)
Requirement already satisfied, skipping upgrade: twine==3.1.1 in c:\python38\lib\site-packages (from robotframework-flaui) (3.1.1)
Requirement already satisfied, skipping upgrade: robotframework-stringformat==0.1.8 in c:\python38\lib\site-packages (from robotframework-flaui) (0.1.8)
Requirement already satisfied, skipping upgrade: robotframework<=3.1.2,>=3.0.4 in c:\python38\lib\site-packages (from robotframework-flaui) (3.1.2)
Requirement already satisfied, skipping upgrade: pdfkit==0.6.1 in c:\python38\lib\site-packages (from robotframework-flaui) (0.6.1)
Requirement already satisfied, skipping upgrade: readme-renderer>=21.0 in c:\python38\lib\site-packages (from twine==3.1.1->robotframework-flaui) (26.0)
Requirement already satisfied, skipping upgrade: requests>=2.20 in c:\python38\lib\site-packages (from twine==3.1.1->robotframework-flaui) (2.24.0)
Requirement already satisfied, skipping upgrade: setuptools>=0.7.0 in c:\python38\lib\site-packages (from twine==3.1.1->robotframework-flaui) (49.6.0)
Requirement already satisfied, skipping upgrade: keyring>=15.1 in c:\python38\lib\site-packages (from twine==3.1.1->robotframework-flaui) (21.3.0)
Requirement already satisfied, skipping upgrade: requests-toolbelt!=0.9.0,>=0.8.0 in c:\python38\lib\site-packages (from twine==3.1.1->robotframework-flaui) (0.9.1)
Requirement already satisfied, skipping upgrade: pkginfo>=1.4.2 in c:\python38\lib\site-packages (from twine==3.1.1->robotframework-flaui) (1.5.0.1)
Requirement already satisfied, skipping upgrade: tqdm>=4.14 in c:\python38\lib\site-packages (from twine==3.1.1->robotframework-flaui) (4.46.0)
Requirement already satisfied, skipping upgrade: docutils>=0.13.1 in c:\python38\lib\site-packages (from readme-renderer>=21.0->twine==3.1.1->robotframework-flaui) (0.16)
Requirement already satisfied, skipping upgrade: Pygments>=2.5.1 in c:\python38\lib\site-packages (from readme-renderer>=21.0->twine==3.1.1->robotframework-flaui) (2.6.1)
Requirement already satisfied, skipping upgrade: bleach>=2.1.0 in c:\python38\lib\site-packages (from readme-renderer>=21.0->twine==3.1.1->robotframework-flaui) (3.1.5)
Requirement already satisfied, skipping upgrade: six in c:\python38\lib\site-packages (from readme-renderer>=21.0->twine==3.1.1->robotframework-flaui) (1.15.0)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in c:\python38\lib\site-packages (from requests>=2.20->twine==3.1.1->robotframework-flaui) (2020.4.5.1)
Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in c:\python38\lib\site-packages (from requests>=2.20->twine==3.1.1->robotframework-flaui) (2.9)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\python38\lib\site-packages (from requests>=2.20->twine==3.1.1->robotframework-flaui) (1.25.9)
Requirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in c:\python38\lib\site-packages (from requests>=2.20->twine==3.1.1->robotframework-flaui) (3.0.4)
Requirement already satisfied, skipping upgrade: pywin32-ctypes!=0.1.0,!=0.1.1; sys_platform == "win32" in c:\python38\lib\site-packages (from keyring>=15.1->twine==3.1.1->robotframework-flaui) (0.2.0)
Requirement already satisfied, skipping upgrade: packaging in c:\python38\lib\site-packages (from bleach>=2.1.0->readme-renderer>=21.0->twine==3.1.1->robotframework-flaui) (20.4)
Requirement already satisfied, skipping upgrade: webencodings in c:\python38\lib\site-packages (from bleach>=2.1.0->readme-renderer>=21.0->twine==3.1.1->robotframework-flaui) (0.5.1)
Requirement already satisfied, skipping upgrade: pyparsing>=2.0.2 in c:\python38\lib\site-packages (from packaging->bleach>=2.1.0->readme-renderer>=21.0->twine==3.1.1->robotframework-flaui) (2.4.7)
Building wheels for collected packages: pythonnet
  Building wheel for pythonnet (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\tuosil\\AppData\\Local\\Temp\\pip-install-nsuuprxs\\pythonnet\\setup.py'"'"'; __file__='"'"'C:\\Users\\tuosil\\AppData\\Local\\Temp\\pip-install-nsuuprxs\\pythonnet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\tuosil\AppData\Local\Temp\pip-wheel-zlu0kwm8'
       cwd: C:\Users\tuosil\AppData\Local\Temp\pip-install-nsuuprxs\pythonnet\
  Complete output (84 lines):
  running bdist_wheel
  running build
  running build_ext
  Checking for updates from https://www.nuget.org/api/v2/.
  Currently running NuGet.exe 4.1.0.
  Updating NuGet.exe to 5.6.0.
  Update successful.
  MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin\amd64'.
  Restoring NuGet package UnmanagedExports.1.2.7.
  Restoring NuGet package NUnit.3.7.1.
  Restoring NuGet package NUnit.ConsoleRunner.3.7.0.
  Adding package 'UnmanagedExports.1.2.7' to folder 'C:\Users\tuosil\AppData\Local\Temp\pip-install-nsuuprxs\pythonnet\packages'
  Adding package 'NUnit.ConsoleRunner.3.7.0' to folder 'C:\Users\tuosil\AppData\Local\Temp\pip-install-nsuuprxs\pythonnet\packages'
  Adding package 'NUnit.3.7.1' to folder 'C:\Users\tuosil\AppData\Local\Temp\pip-install-nsuuprxs\pythonnet\packages'
  Added package 'UnmanagedExports.1.2.7' to folder 'C:\Users\tuosil\AppData\Local\Temp\pip-install-nsuuprxs\pythonnet\packages'
  Added package 'NUnit.ConsoleRunner.3.7.0' to folder 'C:\Users\tuosil\AppData\Local\Temp\pip-install-nsuuprxs\pythonnet\packages'
  Added package 'NUnit.3.7.1' to folder 'C:\Users\tuosil\AppData\Local\Temp\pip-install-nsuuprxs\pythonnet\packages'

  NuGet Config files used:
      C:\Users\tuosil\AppData\Roaming\NuGet\NuGet.Config
      C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config

  Feeds used:
      C:\Users\tuosil\.nuget\packages\
      https://api.nuget.org/v3/index.json
      C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

  Installed:
      3 package(s) to packages.config projects
  Traceback (most recent call last):
    File "tools\geninterop\geninterop.py", line 293, in <module>
      sys.exit(main())
    File "tools\geninterop\geninterop.py", line 273, in main
      python_h = preprocess_python_headers()
    File "tools\geninterop\geninterop.py", line 193, in preprocess_python_headers
      for line in _check_output(cmd).splitlines():
    File "tools\geninterop\geninterop.py", line 41, in _check_output
      output = subprocess.check_output(*args, **kwargs)
    File "c:\python38\lib\subprocess.py", line 411, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "c:\python38\lib\subprocess.py", line 489, in run
      with Popen(*popenargs, **kwargs) as process:
    File "c:\python38\lib\subprocess.py", line 854, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "c:\python38\lib\subprocess.py", line 1307, in _execute_child
      hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
  FileNotFoundError: [WinError 2] The system cannot find the file specified
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\tuosil\AppData\Local\Temp\pip-install-nsuuprxs\pythonnet\setup.py", line 623, in <module>
      setup(
    File "c:\python38\lib\site-packages\setuptools\__init__.py", line 163, in setup
      return distutils.core.setup(**attrs)
    File "c:\python38\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "c:\python38\lib\distutils\dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "c:\python38\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\tuosil\AppData\Local\Temp\pip-install-nsuuprxs\pythonnet\setup.py", line 610, in run
      return bdist_wheel.bdist_wheel.run(self)
    File "c:\python38\lib\site-packages\wheel\bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "c:\python38\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\python38\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "c:\python38\lib\distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "c:\python38\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\python38\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "c:\python38\lib\distutils\command\build_ext.py", line 340, in run
      self.build_extensions()
    File "c:\python38\lib\distutils\command\build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "c:\python38\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "C:\Users\tuosil\AppData\Local\Temp\pip-install-nsuuprxs\pythonnet\setup.py", line 298, in build_extension
      subprocess.check_call([sys.executable, geninterop, interop_file])
    File "c:\python38\lib\subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['c:\\python38\\python.exe', 'tools\\geninterop\\geninterop.py', 'src\\runtime\\interop38.cs']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for pythonnet
  Running setup.py clean for pythonnet
Failed to build pythonnet
DEPRECATION: Could not build wheels for pythonnet which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: pythonnet, robotframework-flaui
  Attempting uninstall: pythonnet
    Found existing installation: pythonnet 2.5.1
    Uninstalling pythonnet-2.5.1:
      Successfully uninstalled pythonnet-2.5.1
    Running setup.py install for pythonnet ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\tuosil\\AppData\\Local\\Temp\\pip-install-nsuuprxs\\pythonnet\\setup.py'"'"'; __file__='"'"'C:\\Users\\tuosil\\AppData\\Local\\Temp\\pip-install-nsuuprxs\\pythonnet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\tuosil\AppData\Local\Temp\pip-record-666z57_3\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python38\Include\pythonnet'
         cwd: C:\Users\tuosil\AppData\Local\Temp\pip-install-nsuuprxs\pythonnet\
    Complete output (6 lines):
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help

    error: option --single-version-externally-managed not recognized
    ----------------------------------------
  Rolling back uninstall of pythonnet
  Moving to c:\python38\lib\site-packages\clr.pyd
   from C:\Users\tuosil\AppData\Local\Temp\pip-uninstall-3feume6u\clr.pyd
  Moving to c:\python38\lib\site-packages\python.runtime.dll
   from C:\Users\tuosil\AppData\Local\Temp\pip-uninstall-3feume6u\python.runtime.dll
  Moving to c:\python38\lib\site-packages\pythonnet-2.5.1.dist-info\
   from C:\Python38\Lib\site-packages\~ythonnet-2.5.1.dist-info
ERROR: Command errored out with exit status 1: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\tuosil\\AppData\\Local\\Temp\\pip-install-nsuuprxs\\pythonnet\\setup.py'"'"'; __file__='"'"'C:\\Users\\tuosil\\AppData\\Local\\Temp\\pip-install-nsuuprxs\\pythonnet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\tuosil\AppData\Local\Temp\pip-record-666z57_3\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python38\Include\pythonnet' Check the logs for full command output.

Unable to update version 2 or higher

When attempting to install to version 2.0 or higher, I get install errors.

C:\>python --version
Python 3.7.9

C:\>python -m pip --version
pip 23.0.1 from C:\Program Files\Python37\lib\site-packages\pip (python 3.7)

C:\>python -m pip show setuptools
Name: setuptools
Version: 67.6.0

C:\>python -m pip show robotframework-flaui
Name: robotframework-flaui
Version: 1.7.3

C:\>python -m pip install --upgrade robotframework-flaui
Requirement already satisfied: robotframework-flaui in c:\program files\python37\lib\site-packages (1.7.3)
Collecting robotframework-flaui
  Using cached robotframework-flaui-2.0.6.tar.gz (263 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\USERNAME\AppData\Local\Temp\pip-install-uhn4xndc\robotframework-flaui_d619f16cba6145b9982505404dca6e78\setup.py", line 34, in <module>
          with open("requirements.txt", "r") as f:
      FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
      ---------------------Branch Informations---------------------
      Release: False
      APPVEYOR_REPO_TAG: false
      APPVEYOR_REPO_TAG_NAME: 0
      APPVEYOR_BUILD_VERSION: 0
      APPVEYOR_BUILD_NUMBER: 0
      -------------------------------------------------------------
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Click is not pressing on the correct tab

At the top of my GUI is a series of tabs.
When using the Select Tab Item By Name keyword, I have no issue.
However, if I use the Click keyword, it always clicks on the first tab in the row.

Test FlaUI tab presses
    [Tags]  Tab
    [Setup]  Attach application by name  ${WINDOW_NAME}
    Log to console  ...
    
    # Originally selects the correct tab, then mouse clicks on wrong tab
    Element Should Exist  xPath2
    Element Should Be Visible  xPath2
    Select Tab Item By Name  /Window[@Name='DevTool']/Tab  tab2Name
    Click  xPath2     # mouse clicks on wrong tab
    Sleep  3s

    # Selects the correct tab
    Element Should Exist  xPath1
    Element Should Be Visible  xPath1
    Select Tab Item By Name  /Window[@Name='DevTool']/Tab  tab1Name

Also, Select Tab Item By Name documentation state it returns the tabnames, similar to Get Tab Items Names

Extend FlaUI by an timeout handler for elements

Currently the FlaUI is implemented with a 1 second timeout handler that validates every 100ms if an element exists.

This guard has the task to prevent the elements that can come up late when GUI windows are opened.

It would be good if you could configure the timeout handler optionally via the FlaUI as a timeout variable.

  • Default 1000 MS interval --> Library FlaUI
  • Disable None -> Realtime no waiting time --> Library FlaUI Timeout=None
  • Numerical value for configuring a smaller or larger timeout --> Library FlaUI Timeout=100

Extend Listbox by keyword

Add the keyword "Select ListboxItem By Name"

  • Implement Select ListboxItem By Name XPATH NAME
  • Write tests Listbox.robot and extend ErrorHandling tests for Listbox
  • Update changelog
  • Update documentation page
  • Pylint is score 10/10
  • Create pullrequest
  • Merge to master

[Enhancement] Provide a keyword: wait_until_element_is_enabled

Dear author
I know that you have provide a keyword: wait_until_element_is_visible, but it's not available for element like button to wait until it is enabled then to click it.
So that. please provide a keyword to wait until element is enabled. Please deal with it in your spare time.

Thanks

AutomationId usage

Not sure if this is an issue, just trying to understand the usage.

It looks like AutomationId can only be used at the same depth as the 'Name' or 'ClassName'. I feel like this defeats the purpose of the ID. ID should be unique to the application right? So instead of having a short & simple xpath /WindowName/object[@AutomationId='IDName'], we have to do something like /WindowName/long/path/to/object[@AutomationId='IDName']

Wait for an Element with timeout?

Hi,
first of all, thanks for this great library. It offers a great alternative to winappdriver based testing with all its performance issues.

May I ask for the reason why the keyword Wait Until Element Is Hidden exists while Wait Until Element Is Visible not?
The "wait for/until Xyz" is a very common pattern in many libraries and I just wondered how to write this with the FlaUI library.

Thanks & best regards,
Simon

RFHUB documentation api calls error by documentation update

Steps to reproduce

  • Start rfhub2 server
  • Git clone FlaUiLibrary
  • Go to FlaUILibrary folder
  • Execute rfhub2-cli --mode=update src/FlaUILibrary/keywords/

Expected result

Keyword documentation for FlaUILibrary should be visualized by rfhub2.

image

Actual result:

  • Exception is called by api call
root@ID-CH-0581:~/robot-flauilib# rfhub2-cli --mode=update src/FlaUILibrary/keywords/
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/robot/utils/importer.py", line 153, in _import
    return __import__(name, fromlist=fromlist)
  File "/root/robot-flauilib/src/FlaUILibrary/keywords/__init__.py", line 1, in <module>
    from .application import ApplicationKeywords
  File "/root/robot-flauilib/src/FlaUILibrary/keywords/application.py", line 1, in <module>
    from FlaUILibrary.core.robotlibcore import keyword
  File "/usr/local/lib/python3.6/dist-packages/FlaUILibrary/__init__.py", line 1, in <module>
    from FlaUILibrary import version, clr
  File "/usr/local/lib/python3.6/dist-packages/FlaUILibrary/clr.py", line 2, in <module>
    import clr
  File "/root/robot-flauilib/src/FlaUILibrary/clr.py", line 8, in <module>
    clr.AddReference(FLAUI_CORE_DLL_PATH)
AttributeError: module 'clr' has no attribute 'AddReference'During handling of the above exception, another exception occurred:Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/robot/utils/importer.py", line 68, in import_class_or_module
    imported, source = self._import_class_or_module(name)
  File "/usr/local/lib/python3.6/dist-packages/robot/utils/importer.py", line 79, in _import_class_or_module
    return importer.import_(name)
  File "/usr/local/lib/python3.6/dist-packages/robot/utils/importer.py", line 195, in import_
    module = self._import_by_path(path)
  File "/usr/local/lib/python3.6/dist-packages/robot/utils/importer.py", line 244, in _import_by_path
    return self._import(module_name)
  File "/usr/local/lib/python3.6/dist-packages/robot/utils/importer.py", line 167, in _import
    raise DataError(*get_error_details())
robot.errors.DataError: AttributeError: module 'clr' has no attribute 'AddReference'During handling of the above exception, another exception occurred:Traceback (most recent call last):
  File "/usr/local/bin/rfhub2-cli", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/rfhub2/cli/cli.py", line 62, in main
    loaded_collections, loaded_keywords = rfhub_importer.import_libraries()
  File "/usr/local/lib/python3.6/dist-packages/rfhub2/cli/rfhub_importer.py", line 72, in import_libraries
    libraries_paths = self.get_libraries_paths()
  File "/usr/local/lib/python3.6/dist-packages/rfhub2/cli/rfhub_importer.py", line 95, in get_libraries_paths
    libraries_paths.update(self._traverse_paths(Path(path)))
  File "/usr/local/lib/python3.6/dist-packages/rfhub2/cli/rfhub_importer.py", line 107, in _traverse_paths
    if self._is_library_with_init(path):
  File "/usr/local/lib/python3.6/dist-packages/rfhub2/cli/rfhub_importer.py", line 265, in _is_library_with_init
    LibraryDocumentation(str(path)).keywords
  File "/usr/local/lib/python3.6/dist-packages/robot/libdocpkg/__init__.py", line 35, in LibraryDocumentation
    libdoc = builder.build(library_or_resource)
  File "/usr/local/lib/python3.6/dist-packages/robot/libdocpkg/robotbuilder.py", line 32, in build
    lib = TestLibrary(name, args)
  File "/usr/local/lib/python3.6/dist-packages/robot/running/testlibraries.py", line 50, in TestLibrary
    return_source=True)
  File "/usr/local/lib/python3.6/dist-packages/robot/utils/importer.py", line 72, in import_class_or_module
    self._raise_import_failed(name, err)
  File "/usr/local/lib/python3.6/dist-packages/robot/utils/importer.py", line 109, in _raise_import_failed
    raise DataError('\n'.join(msg))
robot.errors.DataError: Importing test library '/root/robot-flauilib/src/FlaUILibrary/keywords' failed: AttributeError: module 'clr' has no attribute 'AddReference'
Traceback (most recent call last):
  File "/root/robot-flauilib/src/FlaUILibrary/keywords/__init__.py", line 1, in <module>
    from .application import ApplicationKeywords
  File "/root/robot-flauilib/src/FlaUILibrary/keywords/application.py", line 1, in <module>
    from FlaUILibrary.core.robotlibcore import keyword
  File "/usr/local/lib/python3.6/dist-packages/FlaUILibrary/__init__.py", line 1, in <module>
    from FlaUILibrary import version, clr
  File "/usr/local/lib/python3.6/dist-packages/FlaUILibrary/clr.py", line 2, in <module>
    import clr
  File "/root/robot-flauilib/src/FlaUILibrary/clr.py", line 8, in <module>
    clr.AddReference(FLAUI_CORE_DLL_PATH)
PYTHONPATH:
  /usr/local/bin
  /usr/lib/python36.zip
  /usr/lib/python3.6
  /usr/lib/python3.6/lib-dynload
  /usr/local/lib/python3.6/dist-packages
  /usr/lib/python3/dist-packages

Should Be Visible passes when element is covered by another window.

When one window is covering the element on another window, and I try to click on that element, it will give me FlaUiError: Element position could not be found because it is hidden. Even though FlaUILibrary.Element Should Be Visible returns True/Pass

Click on GUI element
    [Documentation]
    ...     Keyword to mouse click on a GUI element with a xPath
    ...     
    ...     Args:
    ...     - element: Dictionary obj with a key-value pair of 'xPath': 'path/to/element'
    [Arguments]  ${element}
    Log Many  ${element}
    GUI Element Should Exist And Be Visible  ${element}
    FlaUILibrary.Click  ${element}[xPath]

GUI Element Should Exist And Be Visible 
    [Arguments]     ${element}
    Log Many  ${element}
    FlaUILibrary.Element Should Exist  ${element}[xPath]
    FlaUILibrary.Element Should Be Visible  ${element}[xPath]

Modified Post by @Mavnus04 in #92 (comment)_

FlaUI dll usage should be configurable

Robotframework-FlaUI should contain a configuration paramter to decide which FlaUI dll should be used.

  • Net Core 3.0
  • Net Framework 3.5 / 4.0 / 4.5
  • Custom path to specific FlaUI dll
  • Extend library property as flaui usage.
  • By default Net Framework 4.5 should be used.

Example usage

Library         FlaUILibrary  flaui=<core|framework_3_5|framework_4|framework_4_5|custom_path_to_dll>

Press Key issue with combined keys

I am having an issue pressing several keys on my application.

I can send a single key press with t'~' without an issue. But when I try to send ALT+SHIFT+- or ALT+SHIFT+=, it seems to respond only to the keys - or =. Yes, this key combo normally works on the application.
As you can see in my example, I tried sending it as t'' or s'' or assign it as a string, then sending it.

Show the info bar on the unity window 
    [Tags]  unity  
    Log to console  ...
    ${gamename} =  Set Variable  mygame
    Attach application by name  ${gamename}
    FlaUILibrary.Focus   /Window[@Name='${gamename}']
    
    FlaUILibrary.Press Key  t'~'
    Sleep  3s
    FlaUILibrary.Press Key  t'~'
    Sleep  1s
    
    # 'Half Time Scale': 'Alt+Shift+(minus)',
    FlaUILibrary.Press Key  t'ALT+SHIFT+-'
    Sleep  1s
    FlaUILibrary.Press Key  s'ALT+SHIFT+-'
    Sleep  1s
    ${halfTime} =  Convert To String  t'ALT+SHIFT+-'
    FlaUILibrary.Press Key  ${halfTime}
    Sleep  1s
    ${halfTime2} =  Convert To String  s'ALT+SHIFT+-'
    FlaUILibrary.Press Key  ${halfTime2}
    Sleep  3s
    
    #'Double Time Scale': 'Alt+Shift+(equals)',
    FlaUILibrary.Press Key  t'ALT+SHIFT+='
    Sleep  1s
    FlaUILibrary.Press Key  s'ALT+SHIFT+='
    Sleep  1s
    ${doubleTime} =  Convert To String  t'ALT+SHIFT+='
    FlaUILibrary.Press Key  ${doubleTime}
    Sleep  1s
    ${doubleTime2} =  Convert To String  s'ALT+SHIFT+='
    FlaUILibrary.Press Key  ${doubleTime2}

Current version:

C:\Windows\system32>pip show robotframework-flaui
Name: robotframework-flaui
Version: 1.7.3

Related...
I don't understand the difference between the t'' and s'', can you explain more with an example?
Finally, can you clear up this statement? If identifier set try to attach to given element if operation was successfully old element will be reattached automatically. When does the attachment occur and to which element.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.