0

I have a written a intern functional test which copies data from one cell and pastes it to another cell. The problem is every time run the test and copy the data I get a dialogue box with the message

Pasting from clipboard is currently turned off by your browser.Local Data will be used Now because of this popup my functional test freezes and everything else starts to fails. Luckily to avoid this there is a way. .acceptAlert()

.copyfunction()
.sleep(500) //wait for popup
.acceptAlert() //first attempt to copy after login causes alert about using local memory                    
.pastefunction()

Although this works locally there are times the test still fails when in jenkins. Its not stable. How do I make it stable.

8785krs
  • 101
  • 1
  • 1
  • 9
  • Is it changing load time for the popup to appear that is causing the failures in Jenkins? If so, you'll probably want to add a fluent wait instead of the sleep to add some stability. – Swagin9 Dec 03 '15 at 14:20
  • I guess it may be due to the pop up being loaded with delay. Can you provide an example ? – 8785krs Dec 03 '15 at 15:43
  • 1
    I misspoke with the first comment, and I think the ExplicitWait would be better for your situation. Here is a link to all of the wait types with examples: http://toolsqa.com/selenium-webdriver/implicit-explicit-n-fluent-wait/ – Swagin9 Dec 03 '15 at 16:07
  • I am using the intern framework. – 8785krs Dec 03 '15 at 16:17
  • Is there an id associated with the popup? – Swagin9 Dec 03 '15 at 16:25
  • the popup is a browser related which occured when I try to copy/paste on the browser. If there was a id i would pollUntil but its not a part of the DOM. The UI thread freezes and hence all my test fails – 8785krs Dec 03 '15 at 16:56

0 Answers0