GithubHelp home page GithubHelp logo

swinglibrary's Introduction

SwingLibrary

Swing Library is a Robot Framework library for testing Java Swing applications. Usage instructions are in the Wiki.

Downloads are available at Releases 2.3.0

Keyword documentation for the latest version (2.3.0) are available here

This project was originally hosted in Google Code

Building SwingLibrary

See BUILD.rest for development, build and release instructions.

swinglibrary's People

Contributors

badari412 avatar benigroza avatar chenzhang22 avatar cristii006 avatar dependabot[bot] avatar jussimalinen avatar kontulai avatar mgladki avatar mihaiparvu avatar mikahanninen avatar mkorpela avatar muresanrazvan avatar pekkaklarck avatar ricualex avatar rticau avatar spooning avatar urundead avatar wojtekkowaluk avatar yanne 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swinglibrary's Issues

'Click On List Item' in Swing library 1.6.0 not working with integer arguments

'Click On List Item' in Swing library 1.6.0 not working integer arguments. Works OK with Swing library 1.5.3

Click On List Item 0 0 where 0 is first list in window and 0 is item in list fails

Tracelog is as follows. In this example PERFTRENDS_LIST_PARAMETERS is 0 and row is 0

KEYWORD: RemoteApplications.Click On List Item ${PERFTRENDS_LIST_PARAMETERS}, ${row}
Start / End / Elapsed: 20130514 15:44:14.923 / 20130514 15:44:14.938 / 00:00:00.015
15:44:14.925 TRACE Arguments: [ 0 | 0 ]
15:44:14.932 FAIL TestFailedException: caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: argument type mismatch
15:44:14.932 DEBUG java.lang.RuntimeException: java.lang.IllegalArgumentException: argument type mismatch
at org.robotframework.javalib.reflection.KeywordInvoker.invoke(KeywordInvoker.java:51)
at org.robotframework.javalib.beans.annotation.AnnotationKeywordExtractor$1.execute(AnnotationKeywordExtractor.java:55)
at org.robotframework.javalib.library.KeywordFactoryBasedLibrary.runKeyword(KeywordFactoryBasedLibrary.java:37)
at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:73)
at org.robotframework.swing.SwingLibrary.runKeyword(SwingLibrary.java:105)
at org.robotframework.remoteapplications.server.SimpleRobotRmiService.executeKeyword(SimpleRobotRmiService.java:66)
at org.robotframework.remoteapplications.server.SimpleRobotRmiService.runKeyword(SimpleRobotRmiService.java:57)
at org.robotframework.remoteapplications.server.CloseableRobotRmiService.runKeyword(CloseableRobotRmiService.java:40)
at org.robotframework.remoteapplications.org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at org.robotframework.remoteapplications.org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.robotframework.remoteapplications.org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.robotframework.remoteapplications.org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:70)
at org.robotframework.remoteapplications.org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.robotframework.remoteapplications.org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy1.runKeyword(Unknown Source)
at org.robotframework.remoteapplications.org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:205)
at org.robotframework.remoteapplications.org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38)
at org.robotframework.remoteapplications.org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78)
at org.robotframework.remoteapplications.org.springframework.remoting.rmi.RmiBasedExporter.invoke(RmiBasedExporter.java:72)
at org.robotframework.remoteapplications.org.springframework.remoting.rmi.RmiInvocationWrapper.invoke(RmiInvocationWrapper.java:72)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at org.robotframework.javalib.reflection.KeywordInvoker.invoke(KeywordInvoker.java:49)
... 38 more

Click On Component has Jemmy throw exception

With swinglibrary-1.6.0.jar first on my classpath, if I run my simple test script with jybot then, according to the test execution log, when I get to,

    List Components In Context  formatted
    Button Should Be Enabled  config server button
    Click On Component  config server button
    Select Window  server dialog

then for that third line, to click on the button, I get FAIL Exception in Choise expanding which looks to be from Jemmy. Any thoughts?

The formatted components list from the first quoted line does include,

8 javax.swing.JButton 1: config server button

If I switch to using Push Button instead then the push button doesn't make the server dialog window come up at all, it's as if it didn't happen.

Swing Library Keywords are not displaying in RIDE

Hi ,
I have downloaded the SwingLibrary1.02 and also added it to ClassPath but RIDE is not showing any Swing Keywords.
I was reading on robotframework website that i have to create spec file for Java libraries.

Could you please let me know how to create Spec file for Swinglibrary.

I need help.

Facing problem in installation of swing library and its keyword are not coming in RIDE

I am a new user to robot framework. Have installed python, robot framework and SSH library. These all are working fine But when going to install swing library facing difficulty.
I have downloaded the swinglibrary spec file and added in the python path. still the keywords are not coming in RIDE.

Request you to guide me in the related issue.
If my steps are wrong please provide me the correct procedure from beginning how to install swing library and make that compatible with RIDE.

Regards,
vikash

Drag-drop support?

Is drag-drop (or at least mouse press, mouse hold, mouse release) support planned for future releases?

Support scrolling

In some cases it would be helpful if we could verify that component is or is not visible and also to be able to scroll component into view.

Cleanup library documentation

Current libdoc versions support headers and internal links in library documentation. We should rewrite the SwingLibrary docs to take advantage of these new features.

Also "Run keyword in separate thread" should really mentioned in the library introduction text. It is a fairly fundamental feature, that is easy to miss.

Select value from Combo Box, nested in a Table

I'm currently in a test scenario where i need to select a value from a Combo Box,
which is nested in the cell of a Table.
When clicking the first cell of one of the table's rows, the Combo Box shows up.
I tried:

Click on Table Cell tableName 0 0 2 LEFT BUTTON
Select From Combo Box tableComboBox comboBoxValue

and:
Set Table Cell Value tableName 0 0 comboBoxValue

but none of them works, any ideas on how to solve this?
I scanned the internet but could not found any concrete solutions.

Window javax.swing.JOptionPane is not recognized by SwingLibrary

Hi,
I am using SwingLibrary-1.2 to test java application.
#1 : I am invoking a Java window and selecting different options and then clicking on java button

to invoke "Workspace Manager" window , which has a child window "Locate Workspaces"

I am using SwingLibrary "Select Window" Keyword like that.

Push Button 6
Select Window Locate Workspaces

Robot results is giving following error message: FAIL Frame with title "Locate Workspaces"

I am using JSpy and bellow are the properties of "Locate Workspaces" window.
This window is "javax.swing.JOptionPane"
Could you please help me in recognizing "Locate Workspaces" window. Thanks.

Properties of Window ----------------------------------------------------------------------------------------------
Window Title - Locate Workspaces
Index - 0
Instance Of - JOptionPane
Comp. Hierarchy - 4
Name-

Class Name- javax.swing.JOptionPane

X: 0
Y: 0
Size: 284x222
layout=javax.swing.BoxLayout
alignmentX=0.0
alignmentY=0.0
border=javax.swing.plaf.BorderUIResource$EmptyBorderUIResource@153113d
flags=392
maximumSize=
minimumSize=
preferredSize=
icon=
initialValue=
message=com.navtech.bison.ui.workspacemanager.LocateWorkspaceView

0
0
264x168
layout=java.awt.GridBagLayout
alignmentX=0.0
alignmentY=0.0
border=
flags=9
maximumSize=
minimumSize=
preferredSize=

messageType=PLAIN_MESSAGE
optionType=OK_CANCEL_OPTION
wantsInput=false

Tree node popup menu keywords can pick up wrong menu

I had an interesting issue where a popup menu item was getting its enabled status wrong. The correct popup menu was being made visible but it turned out that on the application's main toolbar was a submenu with an item with the same text, and it was that item that was being picked up by the JMenuItemMatcher, which matches the menu item text alone even if the path is wrong. Setting the context to the JTree's container didn't help.

As a quick fix I am locally using mtbc/openmicroscopy@5535130 that additionally checks that the JPopupMenu's invoker is the specified JTree, but it's a bit hacked together. It might be good if the SwingLibrary tree node popup stuff also only matched menu items that come from menus invoked by the tree?

Properties of a random component

I would like to evaluate properties of a random swing component within the robot framework, similar to the "Get Table Cell Property" keyword .
In particular I would like to access the background color of a JTextfield.

It would be great (for me:-) if you could create a keyword like "Get Component Property".

Thanks,
Thomas

"Losing" EDT / Java 6

The following code stops being executed in the event display thread under test when jybot/jython is executed on Java 6.

SwingUtilities.invokeLater(new Runnable()
{
  @Override
  public void run()
  {
    JFrame mainFrame = new JFrame("Test-Frame");
    mainFrame.setVisible(true);
    final JDialog dialog = new JDialog(mainFrame, "Test-Dialog", true);

    logger.severe("EDT? :" + SwingUtilities.isEventDispatchThread()); // -> true
    dialog.setVisible(true);
    logger.severe("EDT? :" + SwingUtilities.isEventDispatchThread()); // -> false
  }
});

The test case that leads to the problem is:
Start Application FrameworkProblem
Sleep 2 seconds
Dialog Should Be Open Test-Dialog
Select Dialog Test-Dialog
Close Dialog Test-Dialog

Everything works as expected when I'm using Java 7.

The problem occurs with the following combination:
robotframework 2.7.7
swinglibrary 1.6.0
Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:48:36)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_45

Click On Component / Component Should Exist Is Not Working with Java Button

Hi,
I have a button "Check" on my application on which I have to press "Right Click"
For that i am trying to use keyword "Select From Popup Menu" but it fails with error message that "Check" subcomponent is not found.
I used "Push Button" kewyword and it is clicking on "Check" button correctly.

But when i am using
Component Should Exist Check keyword then it is giving error that component "Check" does not exist.

I also used
Click On Component Check keyword but still it gives error message that sub component Check not found.

"Check"is JavaButton and i think it is a component. and I want to "Right Click" on "Check" button.
Is there a way or keyword to Right Click on Button or any component.

Thanks.

Select Window or Select Dialog KW only works with the Title property

I been trying to detect a Window and a Dialog by its Name property and is not working I get the next Fail

KEYWORD: SwingLibrary.Select Window mainFrame
Documentation: Selects a window as current context.
Start / End / Elapsed: 20111122 12:51:25.544 / 20111122 12:51:35.560 / 00:00:10.016
12:51:35.560 FAIL Frame with title "mainFrame"

KEYWORD: SwingLibrary.Select Dialog mdeviceSelectorDialog
Documentation: Selects a dialog as current context.
Start / End / Elapsed: 20111122 13:16:04.420 / 20111122 13:16:14.764 / 00:00:10.344
13:16:14.764 FAIL Dialog with title "mdeviceSelectorDialog"

The only way I been able to detect a Window and a Dialog is by Title

My question is
Is possible using the Name property to detect a Windows or a Dialog?
I been using FEST for other automation and you can use Title or Name to detect any object, this is very useful when your intention is to to test and application that will change languages this way you don’t have to duplicate your test cases for each language.

Thanks for your help,
Daniel Meixner

“Send Keyboard Event” KW is the only way?

Hi,

If I what to type some text on a field “Send Keyboard Event” KW is the only way? Or there is a better and fester way to do it?

For example I’m writing “tempx” but is tedious if you what to type some large text

Select Table Cell panelDEDeviceFileList 0 0
Select From Menu File|New Folder
Send Keyboard Event VK_T
Send Keyboard Event VK_E
Send Keyboard Event VK_M
Send Keyboard Event VK_P
Send Keyboard Event VK_X
Send Keyboard Event VK_ENTER

"Tree Node Popup Menu Item Should Be {Enabled | Disabled}" fails if screen is locked

The two keywords above seem to fail (at least, on SwingLibrary 1.6.0 under Linux) if the screen has been locked (i.e. due to screensaver being triggered) during a test execution. The keyword fails with the following error message:

"TestFailedException: caused by: java.lang.RuntimeException: No popup responded to POPUP_MASK at (87,255) on 'configuration tree' (JTree)"

A little research suggests that it might be related to the fact that implementation for these keywords attempts to close the popup menu (after checking item status) by sending an ESC(27) key. This is probably failing due to screen being locked, but we can't tell for sure.

Affected file / line:
org.robotframework.swing.keyword.tree.TreeNodePopupUpKeyWords.java:103

Kind regards,
Eduard Huguet

Update Abbot dependency

To reproduce write some simple app and close the main window, i.e. swinglib.runKeyword("closeWindow, ["SomeWindowName"]). It produces the error below using java 1.7 and swinglibrary 1.4.1 or 1.6.0 but it works well on java 1.6.
I've found a patch to this problem at https://github.com/Rethought/swinglibrary_package. It seems to work but it would be better if you can fix it on future releases.

the error:
org.robotframework.abbot.tester.Robot.waitForIdle(Robot.java:645):
Timed out waiting for idle event queue after 957 events

Is there a Keyword to detect a JPanel?

Is there a Keyword to detect a JPanel? I see Keywords to detect Tables and dialog and frames but no a Keyword for a Panel, or what else could I use?

Thanks for your time.
Daniel Meixner

Add Jemmy logs on Robot log

Jemmy prints debug output during test execution. This should be made available at DEBUG level on Robot logs.

Can I Run APP by compiled exe file, or bat, shell start script

My "System under test" is lunched by a shell script, something like

set MAIN_CLASS=com.xxx.xxx
some of lib path setting lines...
some of java arg setting...
bin/java arg arg arg

I don;t know how to start app by using keyword "Launch Application".
So, can I using this shell start script launch app, then test it by SwingLibrary keyword.

I tried, but not success, Select Window faild , seems can;t find app window

"Select Window" followed by "Select Context" regression in SwingLibrary 1.3

Up until SwingLibrary 1.2 it worked fine to do "Select Window" followed by "Select Context". From 1.3 onwards "Select Context" seems to have no effect if it follows "Select Window".

I have an example of this which I will hopefully attach here in a moment (can't see how to do that from the issue creation screen)

Pass some "JVM arguments" before using KW Launch Application

Before I lunch the application I need to pass some "JVM arguments" how can I do this before using the KW
| Launch Application | com.myapplication.MyApp |

The argument that I need to pass to the "JVM" is the next -DMeixner.Key="-Xrt342y”

because if I tried to lunch the application with out this argument my application will crash after is been lunched

Enhance KW ListComponentsInContext to return values as printed in console

I would like that ListComponentsInContext returns the values (possibly in list format) so programatically I could check what's inside: one List element per line is enough; so indentation is not required.

Currently it doesn't return everything (ID and value is missing) as shown below:

Snipplet
from org.robotframework.swing.keyword.development import DevelopmentKeywords
dev_kw = DevelopmentKeywords()
lct_list_components = dev_kw.listComponentsInContext()
return lct_list_components.split()

Example from console output:
0 com.nokiasiemens.common.framework.mvc.CMInternalFrame 0: 001-001 I01R40G Configuration
1 javax.swing.JRootPane 0: null
2 javax.swing.JPanel 0: null.glassPane
2 javax.swing.JLayeredPane 0: null.layeredPane
3 com.nokiasiemens.widgets.ResizeCorner 0: null
3 javax.swing.JPanel 1: null.contentPane
4 javax.swing.JScrollPane 0: null
5 javax.swing.JViewport 0: null
6 com.nokiasiemens.hit73.windows.card.configuration.Hit73TransponderCardConfigurationWindow 2: null

Example from return value:
0: [com.nokiasiemens.common.framework.mvc.CMInternalFrame,
1: javax.swing.JRootPane,
2: javax.swing.JPanel,
3: javax.swing.JLayeredPane,
4: com.nokiasiemens.widgets.ResizeCorner,
5: javax.swing.JPanel,
6: javax.swing.JScrollPane,
7: javax.swing.JViewport,
8: com.nokiasiemens.hit73.windows.card.configuration.Hit73TransponderCardConfigurationWindow

Just a simple doubt on referencing swing classes

Hello.
I just started using this great library (actually using version 1.6.0).

I was able to detect windows, (main) menus, dialogs, etc... but I have a conceptual doubt which won't let me progressing on testing our application:

After selecting, for example, a dialog, When I use the keyword "List components in context":
${list_components}= List components in context
I get an UNICODE list of all the components visible in the context as expected. What I did not work out yet is how to select or reference a subcomponent (extracted from that UNICODE string) to be able to retrieve information from it.

For example:
After successfully selecting a dialog and list the components on its context, I get something like:

TRACE Return: u'[0 javax.swing.JDialog null: dialog0, 1 javax.swing.JRootPane 0: null, 2 javax.swing.JPanel 0: null.glassPane, 2 javax.swing.JLayeredPane 0: null.layeredPane, 3 javax.swing.JPanel 1: null.contentPane, 4 javax.swing.JOptionPane null: null, 5 javax.swing.JPanel 2: OptionPane.messageArea, 6 javax.swing.JPanel 3: OptionPane.realBody, 7 javax.swing.JPanel 4: OptionPane.separator, 7 javax.swing.JPanel 5: OptionPane.body, 8 javax.swing.JLabel 0: OptionPane.label, 8 javax.swing.JLabel 1: OptionPane.label, 8 javax.swing.JLabel 2: OptionPane.label, 6 javax.swing.JLabel 3: OptionPane.iconLabel, 5 javax.swing.JSeparator null: OptionPane.separator, 5 javax.swing.Box$Filler null: null, 5 javax.swing.JPanel 6: OptionPane.buttonArea, 6 javax.swing.JButton 0: OptionPane.button]'

As it can be observed, there are 3 JLabel classes (with one text field each):
...
8 javax.swing.JLabel 0: OptionPane.label,
8 javax.swing.JLabel 1: OptionPane.label,
8 javax.swing.JLabel 2: OptionPane.label,
...

Next I would like to read the text field of the second JLabel:
8 javax.swing.JLabel 1: OptionPane.label

I could not find any suitable way of performing these steps.
Could you please guide me on the way of correctly referencing this kind of classes?

Your help will be much appreciated,
Thanks!

Get Selected Item From Combo Box --> FAIL: Wait popup expanded

Software versions:

Robot Framework 2.8.1 (Jython 2.5.3 on java1.6.0_45)
SwingLibray 1.6.0

Operating System: 64-bit Linux (with Mint v14)
$ uname -a
Linux adelais 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Issue

My program tests 78 station segments. For each segment Robot Framework launches the application, and verifies that "Get Selected Item From Combo Box" returns what is expected to be there:

| *Setting*   | *Value*         |
| Library     | SwingLibrary    |
| Library     | OperatingSystem |

| Suite Setup    | Start CSM Application |
| Suite Teardown | Stop CSM Application  |

| *Test Case*    | *Action*                   | *Argument*       |
| Verify Dialog  | Select Dialog              | AddRecordDialog |
|                | ${lineno}=                 | Get Selected Item From Combo Box |    LineComboBox |
|                | ${upstream}=               | Get Selected Item From Combo Box | UpstreamLocationComboBox |
|                | ${downstream}=             | Get Selected Item From Combo Box | DownstreamLocationComboBox |
|                | Should Be Equal As Strings | ${lineno}       | 2 |
|                | Should Be Equal As Strings | ${upstream}     | EP |
|                | Should Be Equal As Strings | ${downstream}   | KG |

| *Keyword* |
| Start CSM Application | Start Application In Separate Thread | com.csmt.AppLauncher | -LINE=2 | -STATION=KG |

| Stop CSM Application  | ${pid}=  | Run         | ps -A -o pid,cmd|grep CSM|head -n 1|cut -f 1 -d" " |
|                       | Run      | kill ${pid} |

On occasion (i.e. when it happens, it affects 5/78 stations), I'll see the "Get Selected Item From Combo Box" keyword fail with this message: "Wait popup expanded". Repeating the same test again, immediately after the failure, will pass.

Stacktrace (extracted from debug.txt)

+-- START KW: ${upstream} = SwingLibrary.Get Selected Item From Combo Box [ UpstreamLocationComboBox ]
Wait popup expanded
java.lang.RuntimeException:
at org.robotframework.javalib.library.AnnotationLibrary.retrieveInnerException(AnnotationLibrary.java:101)
at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:83)
at org.robotframework.swing.SwingLibrary.runKeyword(SwingLibrary.java:105)
at robot.model.testcase$py.visit$7(/opt/jython/jython2.5.3/Lib/site-packages/robot/model/testcase.py:65)
at robot.model.testcase$py.call_function(/opt/jython/jython2.5.3/Lib/site-packages/robot/model/testcase.py)
at robot.model.itemlist$py.visit$9(/opt/jython/jython2.5.3/Lib/site-packages/robot/model/itemlist.py:54)
at robot.model.itemlist$py.call_function(/opt/jython/jython2.5.3/Lib/site-packages/robot/model/itemlist.py)
at robot.model.visitor$py.visit_suite$2(/opt/jython/jython2.5.3/Lib/site-packages/robot/model/visitor.py:22)
at robot.model.visitor$py.call_function(/opt/jython/jython2.5.3/Lib/site-packages/robot/model/visitor.py)
at robot.model.testsuite$py.visit$19(/opt/jython/jython2.5.3/Lib/site-packages/robot/model/testsuite.py:152)
at robot.model.testsuite$py.call_function(/opt/jython/jython2.5.3/Lib/site-packages/robot/model/testsuite.py)
at robot.run$py.main$3(/opt/jython/jython2.5.3/Lib/site-packages/robot/run.py:391)
at robot.run$py.call_function(/opt/jython/jython2.5.3/Lib/site-packages/robot/run.py)
at robot.utils.application$py._execute$10(/opt/jython/jython2.5.3/Lib/site-packages/robot/utils/application.py:88)
at robot.utils.application$py.call_function(/opt/jython/jython2.5.3/Lib/site-packages/robot/utils/application.py)
at robot.utils.application$py.execute_cli$5(/opt/jython/jython2.5.3/Lib/site-packages/robot/utils/application.py:45)
at robot.utils.application$py.call_function(/opt/jython/jython2.5.3/Lib/site-packages/robot/utils/application.py)
at robot.run$py.run_cli$7(/opt/jython/jython2.5.3/Lib/site-packages/robot/run.py:415)
at robot.run$py.call_function(/opt/jython/jython2.5.3/Lib/site-packages/robot/run.py)
Caused by: org.robotframework.org.netbeans.jemmy.TimeoutExpiredException: Wait popup expanded
at org.robotframework.org.netbeans.jemmy.Waiter.waitAction(Waiter.java:147)
at org.robotframework.org.netbeans.jemmy.operators.JComboBoxOperator.waitList(JComboBoxOperator.java:418)
at org.robotframework.swing.combobox.ItemTextExtractor.getRenderedComponent(ItemTextExtractor.java:61)
at org.robotframework.swing.combobox.ItemTextExtractor.getComponentWithText(ItemTextExtractor.java:54)
at org.robotframework.swing.combobox.ItemTextExtractor.getTextFromRenderedComponent(ItemTextExtractor.java:44)
at org.robotframework.swing.combobox.ComboBoxOperator$2.executeWhenComboBoxOpen(ComboBoxOperator.java:104)
at org.robotframework.swing.combobox.ComboBoxOperator$ComboboxAction.execute(ComboBoxOperator.java:141)
at org.robotframework.swing.combobox.ComboBoxOperator.getSelectedItem(ComboBoxOperator.java:101)
at org.robotframework.swing.keyword.combobox.ComboBoxKeywords.getSelectedItemFromComboBox(ComboBoxKeywords.java:74)
at org.robotframework.javalib.reflection.KeywordInvoker.invoke(KeywordInvoker.java:50)
at org.robotframework.javalib.beans.annotation.AnnotationKeywordExtractor$1.execute(AnnotationKeywordExtractor.java:62)
at org.robotframework.javalib.library.KeywordFactoryBasedLibrary.runKeyword(KeywordFactoryBasedLibrary.java:37)
at org.robotframework.javalib.library.AnnotationLibrary.runKeyword(AnnotationLibrary.java:81)
... 137 more
+-- END KW: ${upstream} = SwingLibrary.Get Selected Item From Combo Box (10275)

Fix jarjar dependency

SwingLibrary 1.4.1 can not be built with the public version 1.6 of maven-jarjar-plugin. The latest (1.7) version of the plugin fixes the issue.

Unable to run multiple tests in one execution, where tests kill main window

Software versions:

Robot Framework 2.8.1 (Jython 2.5.3 on java1.6.0_45)
SwingLibray 1.6.0

Operating System: 64-bit Linux (with Mint v14)
$ uname -a
Linux adelais 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

What I am trying to test

  1. launch my application with command-line parameters
  2. review with RobotFramework/SwingLibrary that the initial GUI screen has settings that match the command-line parameters
  3. close the application
  4. go to step 1 (re-launch the application with the next set of command-line parameters)

Issue

I found the above to work fine with the demo application found at
https://github.com/robotframework/SwingLibrary/wiki/SwingLibrary-Demo

With my company's application, however, it does not work. After step 3 above, RobotFramework/SwingLibrary aborts execution early and I am not able to run the 2nd, 3rd, 4th, and so on tests.

(I found a workaround: I put the tests for the 2nd, 3rd, 4th.. tests in a separate input file and run RobotFramework against each input file separately. This works ok, but I need my program to combine the results of all the test runs, and so I am not taking advantage of RobotFramework's nice test summary capabilities).

When I run the tests individually they are fine. The issue only exists when I run them during the same Robot Framework (RF) execution. I have tried putting all the RF tests in the same file, or putting them in separate files in a directory. I have tried exiting the application in different ways (via menu File|Exit, via Close Window keyword, via Run keyword to explicitly kill the running pid).

When run without RobotFramework, my company's application appears to exit gracefully, returning a value of 0 and killing all threads.

Details

  1. When the tests are all in the same file, and "Test Setup" and "Test Teardown" are used to start/stop the application, then Robot Framework dies as soon as it gets to the 2nd test. It prints the name of the 2nd test, and that's it. The log.html and report.html is not generated. It does, however, generate debug.txt and output.xml
    (though the output.xml is not complete; Firefox won't open it; parsing error)

  2. When the tests are in different files, and each file has a "Suite Setup" and "Suite Teardown" (or no "Suite Teardown" at all - same result), then RobotFramework dies on the 2nd test with this output:

[ ERROR ] Unexpected error: ValueError: I/O operation on closed file            
Traceback (most recent call last):
  None
Verify Dialog                                                         Traceback (most recent call last):
File "/opt/jython/jython2.5.3/bin/jybot", line 6, in <module>
  run_cli(sys.argv[1:])
File "/opt/jython/jython2.5.3/Lib/site-packages/robot/run.py", line 415, in run_cli
  RobotFramework().execute_cli(arguments)
File "/opt/jython/jython2.5.3/Lib/site-packages/robot/utils/application.py", line 44, in execute_cli
  rc = self._execute(arguments, options)
File "/opt/jython/jython2.5.3/Lib/contextlib.py", line 22, in __exit__
  self.gen.next()
File "/opt/jython/jython2.5.3/Lib/contextlib.py", line 22, in __exit__
  self.gen.next()
File "/opt/jython/jython2.5.3/Lib/site-packages/robot/utils/application.py", line 58, in _logging
  self._logger.close()
File "/opt/jython/jython2.5.3/Lib/site-packages/robot/output/logger.py", line 127, in close
  logger.close()
File "/opt/jython/jython2.5.3/Lib/site-packages/robot/output/xmllogger.py", line 44, in close
  self.start_errors()
File "/opt/jython/jython2.5.3/Lib/site-packages/robot/output/xmllogger.py", line 136, in start_errors
  self._writer.start('errors')
File "/opt/jython/jython2.5.3/Lib/site-packages/robot/utils/markupwriters.py", line 41, in start
  if attrs else '<%s>' % name, newline)
File "/opt/jython/jython2.5.3/Lib/site-packages/robot/utils/markupwriters.py", line 74, in _write
  self.output.write(self._encode(text))
ValueError: I/O operation on closed file

I can provide the exact Robot Framework input files, and etc, if that would help.

Kind regards,
Justin

problem with Click On Table Cell

Hello,

from time to time, I have problem with Click On Table Cell
I get a "Scrolling" and it doesn't click on the table cell
is there another way to select a row or a cell in a table ?

I'm using
Click On Table Cell materialTable ${row} 0 1 LEFT BUTTON

Start Application with Arguments

I'm using RIDE along with Swing Library to try to lunch a java application but that java application needs some arguments. But I can’t figure out how to put that on RIDE I been trying creating a "arg.txt" file but I don't now how that file need to structured

Regards,

1.4 distribution package is broken

1.4 distribution package does not work.

The jarjar-maven-plugin leaves all directories out of the package. The files are there, but as the containing directory is not, AnnotationLibrary does not find the keywords defined in SwingLibrary.

Getting started explanation does not match test

The example on the Getting started page has this explanation:

Inserts text "buy milk" into text field with logical name "Todo Item"

But according to the test it is inserting into a field with a name of "description"

Acceptance tests for the distribution package

Now the acceptance tests are run on the compiled version of SwingLibrary, using maven's classloader. We really should run some of the tests (if not all) using the final distribution package.

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.