In my Gmail, the xpath for the subject and body fields constantly changes every time I compose a new email. So the xpath is not a valid solution.
For the subject I've been able to use the 'javascript action in Safari" of:
var subjectElem = document.querySelectorAll('[name="subjectbox"]');
subjectElem[0].value = document.kmvar.Subject;
where the subject field has an input name of "subjectbox" - so good so far.
All set with the subject.
Now for the body field, which as stated, the xpath ID constantly changes.
The body does not have an input name:
but it does have an 'aria-label' which equals "Message Body"
I"ve tried various combinations in the javascript to no avail. (because at this point I"m guessing, it's well above my pay grade.)
I did find this out on the web,
browser.find_element_by_css_selector("div[aria-label='Message Body']")
but am not sure how to implement it.
Any help would be appreciated.
The goal is to populate the body of a Gmail with a KM variable, where the javascript does not rely on the xpath ID.
Cheers