Returns either this instance's serialized represention, if immediately
available, or a promise for its serialized representation. This function is
conceptually equivalent to objects that have a toJSON()
property,
except the serialize() result may be a promise or an object containing a
promise (which are not directly JSON friendly).
Overrides: webdriver.Serializable
Returns
Object<string, ?>
The JSON representation of this instance. Note,
the returned object may contain nested promises that are promised values.