Limitations on the web element action

feature-request
implemented
web-element

#1

What are the current limitations on the web element action? At present I am unable to do the following on even a simple HTML page.

  1. Get current value from an input field
  2. Get current value from a drop down field
  3. Get current state from a tickbox
  4. Set value of a checkbox (tick it)

My use case around checkboxes relates to confirming the current state of a checkbox before ticking it (as clicking on an existing tickbox will actually clear the value).

At present the only successful operations I have managed with the web element action is to get the inner text value of a web page element (e.g. a span) and to set the value of a text input field.

Can you confirm whether this is expected behaviour at present and whether these core capabilities are being incorporated soon?

Example HTML page and script are below:

<html>
<body>
<form action="dummy">
Test1: <span id="test1" ><h1>Inner text</h1></span><br/>
Test2: <select name="test2">
  <option />
  <option value="test2-val1" selected="true" >Val 1</option>
  <option value="test2-val2" >Val 2</option>
 </select><br/>
Test3: <input value="test3" name="test3" type="password" /><br/>
Test4: <input value="test4" name="test4" type="checkbox" checked="true" /><br/>
Test5: <input value="test5" name="test5" /><br />

 
 </form>
 </body>
</html>

My script is as follows:

My expected results in notepad would be the following:

Inner text
test2-val1
test3
test4
test5

Instead I get the following

Inner text
Val 1
Val 2

[Tips & Tricks] Using XPath
#2

Hi, @MCorrigan_P, thats not an error

In case with:

<option value="test2-val1" selected="true" >Val 1</option>
<option value="test2-val2" >Val 2</option>

You actually got a value, because thats the value of “option” tag

in case with

<input value="test3" name="test3" type="password" /><br/>
<input value="test4" name="test4" type="checkbox" checked="true" /><br/>

Value is missing (empty), and you expected attribute “name” value to appear. Unfortunate right now we can not do it with RPAe. We can get only values, not attributes


#3

Thanks @mzhalniarkevich for the reply.

This is unexpected behaviour as it’s inconsistent with the set process (which does work for text input fields).
The help for the web elements action also specifically mentions dropdown, checkbox and text fields in relation to the get/set values

In my example I am expecting the value, not the name (they just happen to be the same in this case).


How do I get the value from Xpath?
#4

Hi @MCorrigan_P,

Currently, you can only get a value of an html element, in your example this element:

<option value="test2-val1" selected="true" >Val 1</option>

has the following value (or content - see reference):

Val 1

But the rest html elements in your example do not have inner text (content), they only have value="something" attributes:

Test3: <input value="test3" name="test3" type="password" /><br/>
Test4: <input value="test4" name="test4" type="checkbox" checked="true" /><br/>
Test5: <input value="test5" name="test5" /><br />

In future releases we will continue to improve this functionality and will add abilities:

  • to click elements by XPath
  • to get element’s attribute value

#5

We’ve added a voting feature for this topic - just click the Vote button near the Topic heading.

Topics with the highest votes amount will have increased priority on the RPA Express roadmap.


#6

From the 1.1.5 version, Web actions support element attributes: https://kb.workfusion.com/display/RPAe/Web#Web-GetValue