Is there any way that we can scroll down in a webpage till an element where we want any verification or want to enter values ?
Another question is that I used global send keys to scroll a page. It works in object studio if I provide an interval of 0 (as inputs set tends to Yes), but from process studio I get an error as follows
"Internal : Failed To perform Step 1 In Navigate Stage 'Trying scroll' on page 'Select hotel' - Special characters (~{}+^%) are not supported in SendKeys if an interval value is provided. Separate calls can be used to send control characters."
how to overcome such situation ?
Try removing the interval = 0. If this doesn't work, can you please share a screenshot of your action inside the object and the Navigation stage that you are using to send keys?
Related
Right now I developing a product based on Chromium extension which monitors user actions by taking screenshots on several DOM events, such as mouse "click". I using chrome.tabs.captureVisibleTab API for doing that.
The problem: if user makes a click on tab "A" content and then very fast choosing another tab "B" - captureVisibleTab takes screenshot of currently visible tab "B" (instead of tab "A", where action happened).
This is because it take some time while "click" message passing from content script to background (asynchronously) and screenshot taken (also asynchronously) and during that time another tab already activated.
One possible solution I had been thinking is instead of using "captureVisibleTab" - use some another capture API which takes tab id as an argument - but I cannot find such API.
Any ideas?
Has anyone had any problems writing data to a web client data field?
Having spied the field to be written in, the write action correctly writes the value from the data item into the web field. We then "Save" the value in the field by clicking the Save button. This is when the value reverts back to the value that was previously in the field and does not save the new value.
Copying the value from the data item and pasting it directly into the web field and hitting save works fine, but for some reason when Blue Prism does the write action and then save, the new value is not saved.
Any suggestions?
This is probably due to the way the web application is coded - specifically, the data in the box is not acknowledged until a keydown event (or similar) is fired. When you copy/paste the data into the field, it fires a similar event where it believes the user to have interacted with the field.
The solution for this type of field is to use the Send Keys or Global Send Keys functionalities of Blue Prism to send the desired text.
It happens when the target application uses java script events to sense the changes in the element. To handle this , you have to use the send keys in following format.
1. Focus the application / Control
2. Send Global mouse click centre to the element
3. Send "Sendkeys" to the application now.
4. Focus a dummy element in the page to let the page sense your input.
If the old value is already higlighted when the spied field is selected, try getting BP to delete it first, then paste in the new value, then click on the field again, then save. If this doesn't work, then uncheck the URL attribute of the application model you are using for the spied field and try this again.
Internal: Failed to perform step 1 in navigate stage 'password aa mode'on page 'password-aa mode'-command send keys gave invalid result.
i'm unable to get the solution for the above error.
enter image description here
You are working with browser based application , so that HTML mode used for spy element and AA/Win32/Region Mode used for Window Application.
Option 1- First Spy password textbox via HTML mode in application modular & later use write stage to provide value to textbox
Option 2- In case Write stage will not work then you would move to GSK/GSKE text input methods and use navigate stage .
Regards
Vimal
You could try using a Write stage instead, provided you have a model element spied for the password field (probably the same one you are trying to use with the Navigate stage +sendkey + text data item containing the password). Also, remember you should use the root application model (the one at the top of the list) with sendkeys if you insist on using the Navigate stage instead of a write.
i have a button that is calling an agent , and i would like to return to the calling page as the last line of the button.
Is there a way to use context.redirectToPage() in conjunction with "$$PreviousPage" instead of capturing the previous page via a before page load scope variable?
Thanks !
If you just want to 'stay on page' use a partial refresh and eventually the standby control. If you want to get to the previous page you can chain simple actions. Action 1 would be 'run code' action 2 the redirect.
You might want to check your response time. Converting your agent to a Java class will most likely give you better response times
limit number of characters entered in cognos search and select prompt
`The below script works for text box.
<script>
// The ASDF here comes from the Name property of the prompt
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() :
document.forms["formWarpRequest"]);
fW._textEditBoxASDF.maxLength = 3;
</script>`
I need a similiar piece of code to work with Search and select prompt.
I don't have cognos in front of me but let me tell you how i did stuff like this with Javascript. Please read entirely as there are several approaches.
Put a uniquely named/id DIV tag around your native Cognos select and search prompt(The one your typing in. This will make it easy to reference with Java's dom model for the next steps. We will eventually make this default search prompt invisible/hidden but for now keep it visible until the following steps are coded/debugged.
Create an HTML control in the simliar style as the native Select and search with the proper max-length settings that you want. Use the text box on change event to update the native Cognos select and search prompt. for debugging troubleshooting i find it handy to have javascript alert the DIV innerHTML so you can see whats under the hood with the Cognos control. Sometimes i uses this innerHTML as the starting point for my "Cloned/Shadow" HTML prompt that i have control over.
Once you have your new HTML control effectively changing the Cognos control you can make it invisible.
On complex dashboards/scorecarding i wrote routines to clone cognos prompts and expose their HTML so i could create my own control that would quietly manipulate the actual hidden controls. This gave me complete control over presentation and functionality.
There are many variations on this once you have the controls innerhtml like replacing the innerHTML with one of your own immediately after the page loads that has the restrictions on length. Or simply seeing if you can massage the property learning from the innerhtml.
In Cognos 8.4 and 10 there is a new method to dynamically add a method to a control to be called prior to any other methods. It is tricky but it is on IBM's web site. I may be more cleanly implemented in 10 and also IBM is not shy about showing off these solutions on their web site.