Auto-tools/Projects/peptest: Difference between revisions

no edit summary
No edit summary
Line 60: Line 60:
});
});
</pre>  
</pre>  
For documentation on using Mozmill's driver see: [https://developer.mozilla.org/en/Mozmill#Reference_Desk The Mozmill Reference Desk]
For documentation on using Mozmill's driver see: [https://developer.mozilla.org/en/Mozmill#Reference_Desk The Mozmill Reference Desk]  


There are a few [https://github.com/ahal/peptest/tree/master/tests/firefox example Peptests] in the repo.
Note that using mozmill may be convenient but is not required.&nbsp;Here is another example.
<pre>
let window = getWindow();
let width = window.outerWidth;
let height = window.outerHeight;


For more complicated examples, see QA Automation's [http://hg.mozilla.org/qa/mozmill-tests/ mozmill-tests] repo (NB these aren't peptests, though the syntax minus the setupModule and testFoo methods is the same).
performAction('resize_by', function() {
  window.resizeBy(100, 100);
});
 
performAction('resize_to', function() {
  window.resizeTo(800, 600);
});
 
// Tests should clean up after themselves
window.resizeTo(width, height);
</pre>
 
There are a few [https://github.com/ahal/peptest/tree/master/tests/firefox/examples example Peptests] in the repo.


=== Log Format ===
=== Log Format ===
Confirmed users
656

edits