Question
TCS
US
Last activity: 16 Oct 2018 12:03 EDT
Value getting entered into the textbox but when clicking on Go button nothing is happening on the application
Hi All
I have an Angular JS application in which i need to enter the value in a text box and click on Go button.Manually its working fine but when i am entering value using OpenSpan and clicking on the Go button nothing is happening,
Please let me know how to resolve this issue.
***Moderator Edit: Vidyaranjan | Updated Categories***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Fifth Third Bank
IN
Hi,
What is the matching rules you used for the textbox control?
-Harish.
Pegasystems Inc.
US
You will likely need to raise the appropriate JS events. You will need to look into the source of the page and determine what JS events it is listening for (look for onclick, onchange, etc....). The control will have a RaiseEvent method that you can call and set the event to the ones required. You may need a combination of events. Usually, I start with onkeyup, onclick, and onblur.
TCS
US
Hi
I am new to OpenSpan.Can you please provide me example how can i achieve this.
Pegasystems Inc.
US
The text box has a method called RaiseEvent that takes one parameter. That parameter can be selected by clicking into it and you'll see a drop-down list of choices.
TCS
US
Thanks for the info so should i call the raise event block first and then another block to set the value or how should the flow should be .Can you please advise.
Pegasystems Inc.
US
Raise event allows you to do what the page expects to recognize your input. A little detective work is needed to figure out what events are required. Generally, you would raise an event once you have set the text. this forces the page to recognize the text. For instance, onblur means that the control has lost focus, onchange means that the control has changed and so on. Bu looking at the OuterHtml for your controls you can sometimes spot which event is required.
TCS
US
Hi Jeff i tried the approach but the application i am working on is build on AngularJS.
For Angular based application do we need to follow some other approach.
TCS
US
Please find below the html code for the text box :
<input type="text" ng-keypress="onKeyPress($event)" class="form-office" name="txtAccountNum" required customvalidation="Please enter validaccout number"
ng-model="FaSelection.FullAcctNum" ng-disabled="txtClientOffDisable"/>
Also html code for Go button.
<button type="submit" ng-click="GetSolicitating()" ng-disabled="btnGodiable"/>
Pegasystems Inc.
US
Have you tried raising the OnKeyPress event? You might try a combination of OnkeyPress, OnChange, OnKeyUp, and OnBlur if one doesn't work.
TCS
US
i tried all these but still its not working.Please advise
Pegasystems Inc.
US
It sounds like this may require some hands-on assistance. This process is really a trial and error to determine what the website is expecting and triggering the same events. If you are unable to resolve using a combination of calling the RaiseEvent method, then you should open an SR with support. If you do, please include the number here for tracking purposes.
Westpac Banking Corporation
AU
Hi,
How to pass value of KeyChar for KeyPress (Button). In my case I want to pass keychar of 'Enter' or Esc'. Please let me know.
Pegasystems Inc.
US
Anthem
US
I am also facing the same problem. you are right. I need to raise either OnKeyPress and OnBlur. I do not see the methods to do it. how I can raise those events?
Anthem
US
got the answer. thank you ..
-
Ritvik Mohapatra
Pegasystems Inc.
US
By calling the RaiseEvent method of the control.
ANZ
IN
Please post a screen shot of your automation including the matching rules applied
du
AE
I am facing the same issue, upon inspecting the element, the events I got are onblur, keydown, keypress, keyup, mouseout.
I used the raise event method with all the above events mentioned, individually and also combined, but I am not able to paste the value on the textbox.
Please help here.
Unum
US
We encountered the same issue. We are on version 8.1037 and 8.1063. The 1063 version seems to work better out-of-the box with the interogated controls, but the 1037 version is not. We had to basically resort to injecting JavaScript code into the Web Page in order to interact with the AngularJS Framework. Basically you are utilizing the AngularJS API and having to interact with $Scope Data Variables and Functions. One thing that really helped me was to utilize the Developer Tools (F12) in the Browsers (IE and/or Chrome). You can write interactive JavaScript and directly see the effect within the Web App along with being able to debug the Angular Scripts. In your case, you can set the Textbox value at the $Scope level, $apply the change and then Submit the Form (initiate the click event on the submit button via JQuery). Overall you will find the ExecuteScript and InvokeScript to be invaluable.