changed document.write to use document.createElement('script')
[CB-2789] Updating mobile-spec capture API tests to match code