Indexing Bixby Spoken-Summary - bixby

I received help on getting Bixby to read the list in the view, but now I am trying to have it be useful for Hands-Free List Navigation. Is there a way use indexing in Spoken-Summary? Currently it just reads each item in the list, but it will be difficult to use ordinal selection without indexing.

Indeed where-each does not have child-key index-var. You can add an index property in the concept structure and add index value in your JS file as a workaround.
However, I would think the speech itself should be sufficient in selecting content. In case of read-one Bixby will pause after each item waiting for "next" or "yes". In case of read-many developer can set page size.
You can (maybe should) implement your capsule that it takes the content rather than number.
For example: "watch news" --> "which of the following channel would you like" --> "BBC, NBC, CNN, FOX", at the input prompt, rather than auto answer machine, "press 1 for BBC, press 2 for NBC... ", user should be able to say "CNN" or "CNN News" and it will match as an input.
In case you really need index, the current possible work around is to add index as part of the structure in your JS function returning the list. It should not be hard. The voice command of "first", "second"... "last" are built-in features and should work.
You can also go to developer center and make a feature request to add index-var to where-each, but it will be a PM decision to approve or when to implement such feature.

Related

Prevent direct selection from NL training

I matched the concept in selection-of in NL training so that it could now accept the input and display result when i voice-input the option. But the downside of this is it will directly show the result even though i am not in the selection page. Is there any way to prevent this? My approach is match goal of NL with the concept of selection option, with at prompt for the concept
[Update] Would like to show the menu to the user first before they make their selection. The menu can be shown when I running an action
Where playNews> getNews> getMenu (a selection-of input view)
action (getNews) {
type (Constructor)
description (__DESCRIPTION__)
collect {
input (whatuserwant){
type (userWantToHear)
min (Required) max (One)
default-init{
intent{
goal: getMenu
}
}
default-select{
with-rule{
select-first
}
}
}
}
output (newsAudio)
}
To allow voice-input selection, i add training for the concept
So it is able to select selection from the menu, but it also will accept the selection and run even though i am not in the menu yet. Is it possible to get rid of this? Or is this the behaviour of Bixby?
Update: I would remove default-select and add prompt-behavior (AlwaysElicitation) to the input. Read more in our DOC.
You may also want to check this example in GitHub to see how to construct an input view selection from other input of the action. This example is a simplified version of how QuizIt handles the selection part. You may also want to check the training to see how Bixby would take different action with/without the top-level "A" training example.
The input prompt should be easy and simple as you expect: present a list with a message, then user can either tap, or voice select, and able to continue the action.
Here are some additional info you might find useful:
Bixby platform would try to match every property of a struct when an input is missing, so mark the property as visibility (Private) to prevent that. You can also use prompt-behavior (AlwaysSelection) to force a selection of an input.
In case of prompt/continuation training, Bixby would treat it as top-level training is no other training could fit. For example a simple quiz capsule that would construct a default quiz, top level utterance "A" would be treated as if answering the first question as A. To prevent this, just add a training example of "A" and match it to the action you want. Bixby would know to use this top-level training instead of the prompt training.

Can I get Blue Prism to read search engine results based off key terms?

I am a Blue Prism novice and need help!
I am searching on some key terms in Google - when the first page results open, I want to have Blue Prism pick out the link titles which have "Key Term 1" and "Key Term 2" in the titles, then open the links. Meaning that, there could be a handful of results in the Google search results which may (or may not) contain the 2 Key Terms.
Is there any way I can do this in Blue Prism?
Yes, many different ways in fact.
Basic Solution:
First
Have the bot pass "Key Term 1" and "Key Term 2" into the Google search input box proceed by "allintitle:" and linked together with "AND". This will tell Google to only return results with "Key Term 1" and "Key Term 2" in the title.
The search will then look like this: allintitle: "Key Term 1" AND "Key Term 2" (Image Example)
This basically makes Google do the title work and saves you from having to grab the returned page and do a string value comparison between the titles and your key terms.
Second
Spy the appropriate on-page HTML location for the returned links in your Google Search objects Application Model.
The links themselves are held in the <cite class="iUh30">{URL}</cite> HTML element, so your Application Model element will look something like this:
Tag - 'Equals' - CITE
Class - 'Equals' - iUh30
Index - 'Dynamic' -
Third
You can then pass in the number value of the index of the link you want the bot to click on in a Navigate stage. Should this be more than one just have the bot loop over the Navigate stage, but simply add 1 to the current index number before the end of the loop. In order for this to work you will have to setup your bot resources browser options to open links in a new tab, otherwise this will not work.
Another strategy you could pursue would be to have the bot grab the Google search return pages entire HTML and store it in a Data Item. You could then use the XML VBO to parse out everything but the returned links and then do with them as you please.
Grabbing the whole DOM and pulling it into Blue Prism is inadvisable though, as it's always bad practice to introduce the possibility of unknown live scripts being pulled in as well.

basic blue prism email login object

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!

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'

Designing a one EVERYTHING search box (date+address+keywords)

I'm storing information about local "events". They are described by 3 things - address, date, keywords(tags). I want to have only one search box for at least address and keywords. The date might go to a separate field. I'm assuming that most people will search for events that are taking place "today" so this filter won't get that much traffic.
I need those addresses to be correct (because I'm geocoding them afterwards) so I need to validate them before submitting the form and display a list of "did you mean" if a user made a typo there. I can't do life search here. I can do a live search on keywords. Keep in mind that a user can make a typo there too and I want to catch that.
Is there a clever way to design the input's parser in this case to guess which is supposed to be address and which keywords?
OR
Is there a way to actually parse it as user is entering his query? Maybe I should show autocomplete hints for keywords, after 3 first characters are entered, and if user denies to use them then to assume that it's a part of an address he's typing.
What do You think?
Take a look at Document Cloud's Visual search
http://documentcloud.github.com/visualsearch/#demo

Resources