What is a good way to set a "marker" for a UI test automation? Right now my application has quite a bit of background server calls that I want to wait to complete.

I am considering adding some sort of property to a window or document that Selenium can poll.

So far these do work within application, but are undefined for outside of locker container or however:

  • window.foo = true
  • document.foo = true
  • sessionStorage.setItem('foo', true)
  • localStorage.setItem('foo', true)

document.cookie worked, but adds some noise to the key: LSKey[MyNs]foo=true;

EDIT: Managed to make it work using cookies. It's pig ugly, but it works. However, doesn't work other way around - I only wanna set this cookie when app detects it's running in CI. document.cookie while in aura returns "", even when CI sets one up.

  • What automation tool(s) are you using? – sfdcfox Aug 4 '20 at 3:08
  • Selenium / webdriver – dzh Aug 4 '20 at 3:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.