Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing issue using 'Expand TreeItem' with multiple items. #116

Open
albertorivi77 opened this issue Aug 2, 2023 · 4 comments
Open

Facing issue using 'Expand TreeItem' with multiple items. #116

albertorivi77 opened this issue Aug 2, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@albertorivi77
Copy link

albertorivi77 commented Aug 2, 2023

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?

@Nepitwin
Copy link
Member

@albertorivi77

Which kind of exception do you receive?

@albertorivi77
Copy link
Author

Hi @Nepitwin

I receive this error:
FlaUiError: Incorrect syntax usage 'self.current_treeitem.Expand()

I see this error more often when also I expand different treeitem that contains many item. In case the test contain use one or two treeitem command this error will not raised.

@Nepitwin
Copy link
Member

Nepitwin commented Sep 2, 2023

Okay thanks for you response. Afterwards this issue should be easily to reproduce if many treeitems will be created. To investigate if it's a flaui issue here and how to solve it.

@Nepitwin Nepitwin added the bug Something isn't working label Oct 12, 2023
@Nepitwin Nepitwin added this to the Robotframework-Flaui-2.1.0 milestone Oct 12, 2023
@Nepitwin
Copy link
Member

@albertorivi77

I can see from the code that if an exception occurs when opening a treeview, the error mentioned occurs.

                try:
                    if action == TreeItemAction.EXPAND:
                        node.Expand()
                    elif action == TreeItemAction.COLLAPSE:
                        node.Collapse()
                    elif action == TreeItemAction.SELECT:
                        node.Select()
                except ValueError:
                    raise FlaUiError(FlaUiError.FalseSyntax.format(
                        "self.current_treeitem." + action.value + "()")) from None
                except InvalidOperationException:
                    raise FlaUiError(FlaUiError.ElementNotExpandable.format(node.Name)) from None
                except Exception:
                    raise FlaUiError(FlaUiError.FalseSyntax.format(
                        "self.current_treeitem." + action.value + "()")) from None

Unfortunately, the error type of C# is suppressed and you cannot see which error is forcing it. I am currently also not able to reproduce the error.

Do you have an example of this?

@Nepitwin Nepitwin removed this from the Robotframework-Flaui-2.1.0 milestone Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants