Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » How to verify a text on Console View(How to verify a text on Console View)
How to verify a text on Console View [message #1783699] Thu, 15 March 2018 17:18 Go to next message
Nicolas GrossiFriend
Messages: 10
Registered: March 2018
Junior Member
I have the following test

{code}
get-view "Package Explorer" | get-tree | get-menu -path "New/Mule Project" | click
get-window "New Mule Project" | get-group "" | get-editbox -after [get-label "Project Name:"]
| set-text test
get-window "New Mule Project" | get-group "API Implementation"
| get-button "Specify API definition file location or URL" | check
get-window "New Mule Project" | get-button Finish | click
get-view "Package Explorer" | get-tree | select test | get-menu -path "New/MUnit Test" | click
get-window -class WizardDialog | get-group "Flows to test" | get-tree | get-item -path test | check
get-window -class WizardDialog | get-button Finish | click
get-editor "new-test-suite" | get-diagram | get-edit-part -className MuleConfigurationEditPart
| mouse-move 434 96 button3 -height 465 -width 589
get-editor "new-test-suite" | get-diagram | get-edit-part -className MuleConfigurationEditPart
| mouse-press 434 96 button3 -height 465 -width 589
get-editor "new-test-suite" | get-diagram | get-menu -path "Run MUnit suite" | click
{code}

After this a want to check that a specific exception does not appear on Console View - how can i do this ?
Re: How to verify a text on Console View [message #1784288 is a reply to message #1783699] Mon, 26 March 2018 10:16 Go to previous message
Sergen Has is currently offline Sergen HasFriend
Messages: 2
Registered: November 2017
Junior Member
If you are refering to the text in the console view you can get it with something like:

get-view Console | get-text-viewer | get-property text


With this you get the text from your console. You can then use "matches" if you want to check for a specific text with a regex or "equals" if you want to check the whole text.
I recommend to clear the console view first, do your stuff and then check the text in the console view.
Example with a regex:

get-view Console | get-text-viewer | get-property text | matches "<HereIsMyRegExOfTheMessageWhichShouldNotBeThere>" | verify-true


I hope this helps.
Previous Topic:Java Doc with ECL procs
Next Topic:Where can I download 2.0.0 .zip file for standalone RCPTT
Goto Forum:
  


Current Time: Tue Oct 23 14:06:20 GMT 2018

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

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

Back to the top