Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » [SOLVED] How get status of the "Show Properties Properties" button ?
[SOLVED] How get status of the "Show Properties Properties" button ? [message #1586017] Mon, 26 January 2015 16:19 Go to next message
Camille Bertin is currently offline Camille BertinFriend
Messages: 4
Registered: December 2014
Location: France
Junior Member
Hello,

I try to determinate the button "Show Advanced Properties" in the Properties view is pressed or not.
In assertion mode, I didn't find a property approaching that status (pressed / unpressed).

Does anyone know how I can do it by ECL?

Thanks you in advance.

Regards,
Camille


Cordialement / Best regards,
Camille

[Updated on: Wed, 30 September 2015 07:59] by Moderator

Report message to a moderator

Re: How get status of the "Show Properties Properties" button ? [message #1587253 is a reply to message #1586017] Tue, 27 January 2015 08:23 Go to previous messageGo to next message
Olga Yurchuk is currently offline Olga YurchukFriend
Messages: 245
Registered: September 2014
Senior Member

Hello,

Thank you for contacting us!
What is the difference between pressed and unpressed button in your case?
Could you please attach Widget Details of that button? Press button "Widget details..." in Assertion dialog and attach content of appeared window.
As I anderstand property "selected" is exactly what you need.
get-property selected | equals true | verify-true
On attached screenshot this property is "true".

Please let me know if it is suitable for you or you have any questions.



Yours sincerely,
Olga.
Re: How get status of the "Show Properties Properties" button ? [message #1587397 is a reply to message #1587253] Tue, 27 January 2015 10:13 Go to previous messageGo to next message
Camille Bertin is currently offline Camille BertinFriend
Messages: 4
Registered: December 2014
Location: France
Junior Member
Hello,

Thans for your reply.

I try to determinate with RCP TT the status of the "Show Advanced Properties" button.
Is it pressed or unpressed (pinned or unpinned) ? See the attached picture for more explanation.

As requested, please find below the widget details :

Widget information

Class: org.eclipse.swt.widgets.ToolItem
			extends org.eclipse.swt.widgets.Item, org.eclipse.swt.widgets.Widget

WidgetID: Shell/Composite|0/Composite|0/Composite|0/Composite|0/Composite|0/CTabFolder|3/Composite|3/|0/ToolBar|0/ToolItem
Style flags: 32
Enabled: true
Text value: Show Advanced Properties

Registered event listeners:
		listener class: org.eclipse.e4.ui.css.swt.engine.CSSSWTEngineImpl$1
			implements org.eclipse.swt.events.DisposeListener
			events: 
				SWT.Dispose
		listener class: org.eclipse.jface.action.ActionContributionItem$6
			implements org.eclipse.swt.widgets.Listener
			events: 
				SWT.Selection
				SWT.Dispose


Please find in attachment, the details of the available properties in the "Assertion and Verification" window of the Show Advanced Properties button.

Thanks for your help.

Regards,
Camille


Cordialement / Best regards,
Camille
Re: How get status of the "Show Properties Properties" button ? [message #1587451 is a reply to message #1587397] Tue, 27 January 2015 10:52 Go to previous messageGo to next message
Olga Yurchuk is currently offline Olga YurchukFriend
Messages: 245
Registered: September 2014
Senior Member

Hello,

Thank you for screenshots!
I tried the same button on my side and property "selected" turned out to be what you need.


Yours sincerely,
Olga.
Re: How get status of the "Show Properties Properties" button ? [message #1587664 is a reply to message #1587451] Tue, 27 January 2015 13:39 Go to previous messageGo to next message
Camille Bertin is currently offline Camille BertinFriend
Messages: 4
Registered: December 2014
Location: France
Junior Member
Hello,

I tried with the following commands :
if [get-view Properties | get-button "Show Advanced Properties" | get-property selected | equals false ] {
    get-view Properties | get-button "Show Advanced Properties" | click
}

Unfortunately, it did not work.
After these 3 lines of script, the button is always "unpressed".
Have you another operating mode to do it ?


Cordialement / Best regards,
Camille

[Updated on: Tue, 27 January 2015 16:08]

Report message to a moderator

Re: How get status of the "Show Properties Properties" button ? [message #1587768 is a reply to message #1587664] Tue, 27 January 2015 14:55 Go to previous messageGo to next message
Olga Yurchuk is currently offline Olga YurchukFriend
Messages: 245
Registered: September 2014
Senior Member

Hello,

Thank you for ECL snippet!
Add key -raw after get-property selected.

if [get-view Properties | get-button "Show Advanced Properties" | get-property selected -raw | equals false ] {
get-view Properties | get-button "Show Advanced Properties" | click
}

When get-property command is executed, internally it does not return a property value, it returns a special verification handle object.
To get value it is needed to add key -raw.
You can find more information here.

Please let me know if you have any questions!


Yours sincerely,
Olga.
Re: How get status of the "Show Properties Properties" button ? [message #1587873 is a reply to message #1587768] Tue, 27 January 2015 16:09 Go to previous message
Camille Bertin is currently offline Camille BertinFriend
Messages: 4
Registered: December 2014
Location: France
Junior Member
Hello,

I tried your script and it works very well.

Thans a lot for your help.


Cordialement / Best regards,
Camille
Previous Topic:Some troubleshooting in recording testcases using RCPTT
Next Topic:Issue when replaying get-combo command
Goto Forum:
  


Current Time: Thu Apr 18 19:28:55 GMT 2024

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

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

Back to the top