Webelement - Xpath - Get value of input-element made with AngularJS / ng-model?

input
get-value
xpath
angularjs
webelement

#1

Hi :smiley:

I am working with a website that uses AngularJS - ng-model for the input-elements. In practice this means, that the code of what is seen on this picture:

Looks like this:
<input class="form-control ng-pristine ng-valid ng-valid-required ng-touched" id="number_4115" name="number_4115" ng-model="evm.element.value" ng-readonly="evm.disabled || evm.element.systemManaged" ng-required="evm.element.required &amp;&amp; evm.validationRequired" type="number">

Thus the value “30” is not stated directly in the html code and makes it hard for me to get the value “30” with XPATH.

Can anyone think of an solution? I think the problem is somewhat similar to the problem of this guy: https://stackoverflow.com/questions/40339435/ng-model-gettext-method-issue-selenium-webdriver-with-javahttps://stackoverflow.com/questions/40339435/ng-model-gettext-method-issue-selenium-webdriver-with-java. but I don’t know how to transfer the solution to WorkFusion :thinking:

Currently i’m using combination of click by XPATH, crtl+a, crtl+c and save clipboard to variable, but it is a quite slow approach with 50 input elements :hushed:


#2

One solution could properbly be if WorkFusion Express supported Protractor and not only Webdriver… But Hopefully there is other solutions :slightly_smiling_face:


XPATH support of parent:: etc
#3

Jens,

Thanks for your input, we will improve the Web Element action and you will be able to get any attribute value. Please vote for this feature to raise it’s priority.


#4

Thanks for the answere. That sounds great! :grinning: