How do i create a message box in blue prism? - blueprism

I need to create a couple of message boxes in blue prism for a demo. This is how far I have gotten:
1. I am using the code stage
2. In the Inputs tab I have declared my Message and have given it a value
3. In the Code tab I have declared: `MessageBox.Show(Message)`
When I validate the code I get a compiler error: "
'MessageBox' is not declared "
Guidance is greatly appreciated. Thanks in advance!

You need to import System.Windows.Forms to your namespace in order to reference the MessageBox object the way you currently have in your code.
Open the initialize page of your object. Right-click the Description box (located in the upper-left of your page, by default) and select "Properties".
Click over to the Code Options tab.
Add a Namespace Import by clicking the Add button to the right of the "Namespace Imports" table. Set the new line item's value to "System.Windows.Forms".
Reset and re-run and you should be good to go to use MessageBox().

Related

Robot- Selenium : How we can handle a element (text box) whose ID is changing dynamically

I am facing one simple problem-- there is one Add button in the web page, After clicking that a small pop up window (Not in another browser tab , without title) opened having 3 text box. These id/xpath is getting changed whenever will click on Add button. I need to to enter few data and then save.
Could you please help me how we can handle this dynamic xpath/id ---text box in robot selenium framework. Is there any way we can input on text box based on label. Please share any pointer or sample code.
Thank you very much for the help.

Select a check box in Blueprism

I need to select a check box as shown in below image. I tried giving "Set Checked" on Navigate stage but it didn't seem to work.
When i try to capture the Checkbox element using HTML Mode, it is getting captured as a HTML Element and not HTML Checkbox.
Can anyone help me here please.
In my projects, a lot of times it was possible to use action "Write", and write value "True" to this element.
If not, then it should be possible to change the element type directly in the Application Modeler. Please inspect first your element, and then change these two parameters:
Element type = "HTML Check Box"
Data Type = "Flag"
Afterwards, in "Navigation" stage, there should be an action "Set checked" available.
For reference, I was able to inspect the logo from w3schools.com and mark it as checkbox in BluePrism.
Just take your datatype as 'Text' and set it to click centre in navigation.
While running the step it will set it checked and proceed it further.
When you use the "Set Checked" action as part of a Navigate stage, you have to set the "Checked" parameter in the lower portion of the Stage Properties window to "True".
Identify the required check box in Active Accessibility SPY Mode. The element Type for this will be Check Box(AA), Change it to Active Accessibility from the drop down. And then use this element in Navigate stage and select "Global Mouse Click Center" in the Actions drop down, to Check this check box

Button handling and output (Wicket framework)

I have got a task to write a calculator on wicket and I have faced with some problems.
How to get button value(1,2,3...-,+,/,*) handle it(multiply or divide) and output a result to text field to user? Could you help me, please.
In swing it is really easy, e.g. new JtextField.setText("Shalom world!"); How I can do the same in wicket?
Thank you
Use a TextField, or Label, to display the calculator value. The model for the component should get an object that you update on each click of a button. A quick way to do this would be to create a member variable in your class that holds your total and use a PropertyModel to get the value of the member variable. If you are using AjaxLink, you will need to add the TextField to your target on click of each button and you need setOutputMarkupId to be true.

hardcoded string “Button”, should use #string resource

I am new in Android app development and using Java language.
My problem is every time I make a TextView or Button there is a triangle with the exclamation mark below them.
and when I click it I saw a message saying:
hardcoded string “Button”, should use #string resource
I have two activities, in my main activity there is a Button that when you click it you will go in second activity.
But when I go to my main.java to make a code for the button. There's always the above shown error. I think the eclipse can't find the id of my button and same for my TextView they have same error message.
Here is the code I made:
Button b = FindViewById(R.id.button1);
I also add:
Button b = (Button) FindViewById(R.id.button1);
I am using the latest eclipse classic and ADT august issue. The platform is Android 4.1 API 16.
You shouldn't hardcode the "text" on the widgets use the strings resources ie., strings in the strings.xml to set the text. Declare the "text" you want to display as a string in strings.xml and access it using #string/your_string_name in the layout file.
Notice the id of the button, which is rounded in red. You have to use this id when you want to call it in a method, for an example
Button b = (Button) FindViewById(R.id.button1);
Furthermore, check whether your graphical layout matches with the image I have provided.
Just try your code again with these changes.
Your main.java would look like this.
I am a newbie too, but I believe I got this. So basically what's happening here, java wants you to put your hardcodes in string.xml. so that when accessing it, you will use the given methods below before:
.
But this is how it should be.
Let's start by string.xml
Then come back to your activity_main.xml

vc Resource item display can't be access & is disable

I use VC and I'd like to load a bitmap file on my user Dialogue.
But when I choose the picture item and add it into my Dialogue.
I found that the picture item can't be access by its property.
I can only show the bitmap by adding a bitmap item and I
can not use the picture item. why? Could have anyone else tell me
how to enable the picture item in my Dialogue , so that I can edit
the picture item 's property??
Lovely everybody, I found my soloution, And Now I
can show different Bitmap in my Dialogue without
use any source code.
Here is the Website that I found the problem:
http://www.functionx.com/visualc/applications/displaybitmap.htm
Hope it help

Resources