I just tested the below macro in both Safari and Chrome, and it worked as expected.
MACRO: GMail Compose Test
VER: 1.0 2016-10-21 ~~~
DOWNLOAD:
GMail Compose Test.kmmacros (3.6 KB)
ReleaseNotes
- Open Safari or Chrome
- Open and sign in to your GMail account
- Click on the "Compose" Button"
- Trigger this macro
Script
Uses this simple test JavaScript
var subjectElem = document.getElementById(":h7");
subjectElem.value = "My TEST Subject";
See this video to learn how to inspect a web page and find the Element ID and XPath:
Video -- How to Inspect Web Page to Find Element ID and XPath