Attributes

Interacting with Element Attributes

Parameter Specification

Name Spec Data Types Description
attribute optional Object of Key:Value Set attribute value

Example

  <input type="text" id="info" value="" data-a="Value A"  data-b="Value B">  

Setting Attribute Values

SELECT css("#info[data-a]") as aval, css("#info[data-b]") as bval 
FROM http://www.delven.io/test/execute.html EVENTFLOW
[
  {
    "by-css": "#info",
    "attribute": 
      {
        "data-a": "New Value A",
        "data-b": "New Value B"
      }
  }
]

Results

{
   "aval": 
   {
      "value": "New Value A"
   },
    "bval": 
   {
     "value": "New Value B"
   }
}