0

One of the components on our website, when clicked, copies its content onto the clipboard, and during the copying operation a tooltip is shown that says 'Copying...'

The copying process is almost always instantaneous, however... So how can my Quality Assurance colleague test that the tooltip is appearing? Is there any way to artificially slow down clipboard operations on a Mac, or on a PC for that matter?

This is a black-box type operation, so a suggestion that requires me to add a delay or logging to the code temporarily, for testing purposes, is not a viable solution.

pgblu
  • 582
  • 5
  • 27

1 Answers1

0

Your question is not specific enough however I'll try to give you a clue. Copying to clipboard is implemented with the help of JavaScript. So there are few ways of how to achieve this. Find them here https://stackoverflow.com/a/30810322/8343843.

So depending on which approach is used in your case, you may do a sort of reverse-engineering (if you don't really have the developer guys available), set up break-point to the place where actual copy step is performed (using browser dev tools) and then execute code line by line. Depending of how the tooltip is implemented there is some quite high probability that you will see your tooltip for longer time.

You may also set a DOM-breakpoint that would be listening the DOM change. This will help you to freeze the tool-tip if it is implemented as a DOM node.

Alexey R.
  • 4,490
  • 1
  • 7
  • 22