basic blue prism email login object - blueprism

Trying to learn basic blue prism.
I have made an object to login to my gmail account.
It enters the page where mail id has to be entered. The email id gets entered and the next page appears where the password has to be entered. But in the writer tool it shows the following message : "Internal : Failed to perform step 1 in Write Stage 'Writer2' on page 'Initialise' - No elements match the supplied query terms"
I looked into all the most obvious bugs and I cant find anything wrong. Can someone please give any suggestions as to what the problem could be?

The specific error message you're getting indicates there's an issue with your spying of the element you're attempting a Write on.
Without knowing anything else about the way you've included/excluded certain attributes of the element you're attempting to write to, the only sound advice one could offer would be to open the Application Modeler and trial-and-error the "Match?" for each attribute until you're able to use the "Highlight" button and verify a single interface element is selected. (Usually in circumstances such as yours, the "Value" attribute of the element you've spied has its Match checkbox selected, but the value has changed since spying it, thus making it not a match.)

check if the data item you are storing the password in is of password type.

You can reset the password by going ahead with the "write" property and delete once and drag-drop again at the same place and click OK. reset the flowchart and run them again, you'll not get the error. I had faced the same issue earlier and got fixed.
It sometimes happens due to the slowness of your internet connection BP not able to read the data item info and directly moved to next steps, to fix it, you can use wait functionality and give the 8-10 sec of wait time.
Hope this helps.
stay blessed!

When spying a browser please make sure you are using HTML mode to capture the necessary Element (please note that BP only supports IE, so no Chrome or other browser!). Also, please remember that the browser page you are spying has to be launched from the Application Modeller in order to be "attached" by BP.
To cycle between modes, simply hit the Alt key after clicking "Identify" on the Application Modeller. After you have captured the correct area of the page where your password goes, uncheck all the attributes of the element that are blank and also the URL attribute (you should be left with 4 maybe 5 atributes left), then hit "Apply" and "OK". Click "Highlight" to make sure BP still finds the element of the page that you want. Then in your Process or Object canvas, use a "Write" stage and drop this element you just created in the Element field, and the password into the Value field (the value has to be between "" unless you are using a data item instead of typing it in). If you have done all this, the "Write" stage should most definitely enter the password into the password field. Good luck!

Related

In Blue prism button is not able to click while executing mode

Hi I am new to blue prism
My question is:
I have button in my application after recording if i try to highlight it is working fine but while executing it is not able to click the button and i am not getting any error.
If you provide a screenshot of the attribute list in your application modeler, it might be easier to provide an accurate answer. However, for now, I can give you some pointers:
For most applications the following can be unticked:
any elements with a blank value
all 'Parent' attributes unless
required to make the element a unique match
the 'Visible' and 'Enabled' attributes usually have no impact if left ticked or unticked, so can often be unticked
With any attributes which may not be persistent and could be prone to changing — i.e. element count, application’s URL, etc.—, it is recommended to untick them or, if required in your process, use the wildcard match type to dynamically build the corresponding values which will allow easy identification.
To speed up finding the elements, it is recommended that the Match Index attribute be used when possible. This works by stopping Blue Prism from trawling through the application model for duplicate elements once one matching element is found.
It is also recommended to add a wait stage at the start of each action. This will handle system latency and provide a correct path for your process:
The above are some pointers that I have consolidated for your ease. However, all the help you need can be found on the Blue Prism portal itself : Blue Prism Documentation
Hope this helps.. Good luck!

Cucumber scenario with same buttons?

This is my first time doing cucumber, so maybe what im asking isn't wrong but it just seems like there is a better way:
So right now im going through a survey-like website as my first automation task with cucumber. It works just fine, but like most surveys theirs a lot of "Fill then out, then click Next"
so in my Feature file I have a lot of:
Then I will click 'Next'
Which matches with the step (Since the button all have the same text):
Then(/^I will click 'Next'$/) do
click_button('Next')
end
So this one step definition defines like 8-9 lines in my feature file...which I guess is ok, but my feature file just looks...ugly? Im not used to the Gherkin language AT ALL as this is my first time, but it's basically turned into a lot of:
THEN SELECT THAT THING FROM DROPDOWN
THEN CLICK THIS RADIO BUTTON
THEN SELECT THIS BUTTON
THEN CLICK NEXT
Like over and over....I mean it's human readable, but it just looks messy? is this right?
Also im not really sure when I should use "explicits" in my feature file? Like should I explicity say Im going to select 'X' (or "X", not sure if it matters) from a dropdown? or Click the 'Next' button or select the 'yes' radio button for example?
You are writing what are called imperative steps and it is indeed the wrong way to go about cucumber/gherkin.
Your steps should be saying "WHAT" you are doing and not "HOW" you are doing.
Not knowing the details of your form, let's make up a flow.
Page 1. Name
Page 2. Demographics
Page 3. Favorite football team
Page 4. Favorite basketball team
Page 5. Results page showing how popular their teams with other survey takers
Given I enter the "Are you a Bandwagon Fan Survey"
When I enter my name
And I enter my demographics
And I choose a favorite football team
And I choose a favorite basketball team
Then I should be directed to the result page
And I should see my teams ranked on a graph
The details for entering your name and clicking next should be hidden inside that stepdef. A person trying to test your app doesn't care what the name is, or what the field ID is or anything like that. They just want to know the work flow.
If you are doing scenarios to get the name page to error you simply modify your gherkin to say something like.
When I enter a name too long
Then I see a name too long error message
When I do not enter a name
Then I see a name missing error message
Again, you leave the details of too long or what the error message is to the step def (or below) unless it is critically important to the test scenario. I usually set up factory girls to handle my data and just use the text of the scenario to pull the current data. so I'll have an error message factory and within that a "name_missing" and a "name_too_long" sub-factory that provide the correct values. If I need to change or look something up, everything is in the same place...but above all it's not cluttering my gherkin.
Yes I think you want to send parameters to step definition
Then I will click 'Next'
Step definition will be
Then(/^I will click "([^"]*))*"$/) do |text|
click_button(text)
end
also above will work for
Then I will click 'OK'

Need syntax to call a refresh on one component from another on the page

I have a fairly straightforward and common use case. A panel, in which resides a repeat control. The repeat control gets its content from a view lookup by key. Below that repeat control is another panel. This panel has a data binding to a new notesdocument. The panel has a couple of fields on it for the new document and a submit button.
It all works, however after submit (presumably in the "postSaveDocument()" event) I want to call back up to the repeat control and have it re-perform its lookup and refresh its content.
I'm looking to understand syntactically, how I can reference the repeat control and its properties and methods from elsewhere on the document -- and secondarily (though I can look this up once I get the first part figured out) what the refresh() method would be for that that repeat control.
Ideally, I think its something like: xp:page.repeatcontrolname.refresh() -- though I know that isn't right.
I'm sure once I see an example, it will apply to a myriad of other things.
Update :
I discovered that the repeated elements were actually refreshing but I wasn't seeing a new entry added to the list. The reason, ultimately, turned out to be that to add another entry to the repeat list I needed a new "control" -- but I'd checked that box (on the repeat control) that said "Create Controls at Page Creation". It was preventing my XPage from creating another entry for the new document to display!
This article explains the syntax for doing what you describe:
http://avatar.red-pill.mobi/tim/blog.nsf/d6plinks/TTRY-84B6VP
I have a feeling that this one captures the actual use case.
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Create_and_display_responses
The key setting that people tend to miss is "ignoreRequestParams".
Andrew,
The 'XSP.PartialRefreshGet' call was broken in Domino release 8.5.3 which results in the '_c9 is undefined' error.
Have a look at the article posted by Tommy Valand:
http://dontpanic82.blogspot.com.au/2012/03/patch-for-bug-in-xsppartialrefreshget.html
Basically to work around the problem a second argument is required to be passed to the call, for example:
XSP.partialRefreshGet("#{id:ExistingDevicesList}", "")

Fields not calculating in Lotus Notes

Using Lotus Notes designer I have created a form and added a field on that form that does a #DBColumn look up. The form then is viewed through the web browser and everything worked great.
I proceed to add another document to the database using that form, now the original documents still render in the browser fine but the new document doesn't return anything to the field.
I tried removing the #DBColumn look up and just displaying text but nothing I just get 0.
The weird thing is if I rename the field to something diferent everything works perfectly but then if I rename the field back, broken, no calculation.
Does anyone know why this is? It has happened to me with various fields through out my application. I originally thought maybe it was a reserved word thing but I now know that is not the case. I usually just rename the field and move on but there has to be an explanation. Is it a caching thing or what?
Thanks for the info!
You haven't mentioned the type of your fields Is it 'computed for display'? If you have computed for display fields in a form, and the documents already contain data stored in an item with the same name, then the computed formula is bypassed and the item value is displayed as-is.
Fields not calculating could be a caching issue. Try opening the form, edit mode, F9 to recalculate all fields.
If this does not help, close the form, press Ctrl+Shift+F9 to forcefully refresh all views in the DB (could take some time). Reopen your form, edit mode, F9. If the value shows up, try using the "nocache" parameter on your #DBColumn.
Depending on your application design, there could be a number of reasons for the problem. Perhaps the view used for lookup is not set to autorefresh or the server does not refresh often enough because of high load issues.

Enable/disable editing of a form field from code

I'm not a Notes programmer, however, for my sins, have been working on some Notes features for an in-house project recently. I need to enable/disable editing of a field depending on circumstances. It seems to me to be a fairly standard feature, I need, but I can't find any information on how to do this anywhere.
In form setup (and other field's onchange) code, something like the following:
if some requirement = true then
textField.enable = true
else
textField.enable = false
end if
I've seen other places where there's a workaround of conditionally hiding paragraphs based on some code, having 2 paragraphs with opposite hiding conditions, one with an editable field, the other with a computed field. However, I don't know enough about Notes to see how this is implemented (I can see it done on other forms, but there seem to be some 'magic' steps within Notes which I either can't see or don't get).
[EDIT]
The reply from Kerr seems to be what I'm looking for, but I still can't find out where the InputEnabled property is located. Should have said in the initial question, I'm using Notes 7.0.3.
In fairness, it doesn't matter what the circumstances are for when to enable/disable the field, it's just some boolean condition that is set, in my case only on form loading so I don't even have to worry about this changing dynamically while the form is displayed.
I've got a few issues with Notes, my largest bugbear being that it's so tied so tightly to the Designer UI, which is utter shite. I can do this sort of thing programmatically in most GUI languages (C#, Java, Delphi, even VB), but I need to open property boxes in Notes and set them correctly.
This would be OK as an optional method, but forcing you to go this way means you can only work as well as the IDE lets you in this case, and the IDE here seems to actively work against you. You can't open multiple functions/scripts, you can't swap from one script to another without going back to the menus on the left, you can't easily search the codebase for occurrences of variables/fields (and believe me, this is a major failing for me because either Notes or the internal codebase in my case seems to make a lot of use of global variables!), you can only work with fields through the property boxes that get displayed, you can't edit code in Designer while debugging through the main Notes client.
While the Java side of the coding is better than LotusScript, it's still fairly crappy (why can't you debug INTO Java code?? Why do you need to re-import JAR files for each Java class, does each class have a different CLASSPATH???). Possibly this was improved in Notes 8, I hear it's based on Eclipse. Does anyone know whether this is true or not?
It would help to hear more specifics about the 'circumstances', but the most common way to handle this is to use a hide when formula on the field you want to enable/disable.
Technically you are not enabling or disabling the field, just hiding it, but usually that works just as well.
Since there are few events to work with in Notes, developers commonly use the document refresh as the 'event' to cause the field to hide or show.
Let's assume you have two fields called TriggerField and Subject. Say also you want to disable the Subject based on a value in the TriggerField. The easiest way to do so is to set the TriggerField as a Dialog List type and check the "Refresh fields on keyword change" option. This means when the value of the dialog list changes, the entire document will get refreshed.
Then in your hide when formula for the Subject field, you specify your criteria for when to show or hide that field. Anytime field values change, followed by a refresh of the document (i.e. form), that hide when formula will be re-evaluated.
There are other ways, depending on your circumstances, to solve this problem. If you want to let the user refresh the form themselves, put a button on the form that calls the #Command([ViewRefreshFields]) command. You can add any other formulas to that button before the refresh command if you want to make other changes to the form at the same time.
Another option is to make a certain field display-only. Then create a button that runs LotusScript to allow users to change that display-only field. In the script you can propmt the user for a value, set the display-only field, and then call for a document refresh.
In ND7 and up if you want to just disable the field for input, write an appropriate formula in the InputEnabled section of the field you want to disable.
So I have two fields one called Trigger, a checkbox with the value "On" and another Subject that is a text field. When Trigger is checked I want the value Subject to be enabled.
I simply put the following formula in the Input Enabled element of the field Subject:
Trigger = "On"
I also want this to be recalculated whenever the value of Trigger changes so I select the "Refresh fields on keyword change" option on the Trigger field.
If you're stuck in an older version you need to to hide paragraphs appropriately.

Resources