Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Intellij plugin testing (Intellij Plugin testing with jubula)
Intellij plugin testing [message #1752960] Tue, 31 January 2017 11:22 Go to next message
Lakshan Jayakody is currently offline Lakshan JayakodyFriend
Messages: 8
Registered: January 2017
Junior Member
Hi,

I am working on a plugin for Intellij IDE and have to automate the GUI tests by using Jubula.

Problem....

Need to get the selected text's properties (ex:color) in the source code editing area. When the source code editing area is selected from mapping mode most of the properties are shown, it also includes the "selected text" if any. But it shows the "selected text color" as null always.I need to get the color of the selected text.

Please provide a solution.

Intellij version : 2016.2.4
Jubula version : 8.4.1.123
Re: Intellij plugin testing [message #1753136 is a reply to message #1752960] Thu, 02 February 2017 07:34 Go to previous messageGo to next message
Eclipse UserFriend
Hi Lakshan,

unfortunately, we can not do anything against the empty property since this value is solely defined on the IntelliJ-side. However, you could try to add a class with a static method to your plugin which retrieves the value by then using ub_grc_invokeAndStore from our unbound modules in Jubula.

In your plugin define a class, wherein you define a static method with an Object argument and a String return value. Inside the method, parse the object to com.intellij.openapi.editor.impl.EditorImpl and call getSelectionModel().getTextAttributes().getForegroundColor() on the editor and then any method to convert it to a String e.g. getRGB() on the color. It might also be possible that getForegroundColor() is not exactly the color you are looking for so you should have a look at which method exactly retrieves the desired color. Then simply return this value.

In Jubula, use ub_grc_invokeAndStore and configure it according to our documentation. You do not have to enter any other arguments since the graphics component the action was mapped to, so in this case the editor, will be given as first argument to your method.

Best regards,
Kevin
icon14.gif  Re: Intellij plugin testing [message #1753415 is a reply to message #1753136] Mon, 06 February 2017 08:35 Go to previous message
Lakshan Jayakody is currently offline Lakshan JayakodyFriend
Messages: 8
Registered: January 2017
Junior Member

really helpful
Definitely I'll try this and let you know.

Thank you very much..

Previous Topic:Where to set the polling interval for retries
Next Topic:AUT does not start with Jubula 8.4.1.123
Goto Forum:
  


Current Time: Thu Apr 25 13:46:18 GMT 2024

Powered by FUDForum. Page generated in 0.04213 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top