mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
Add typeInterval constructor option and screenshot overload for clipping path
This commit is contained in:
Vendored
+2
@@ -96,6 +96,7 @@ declare class Nightmare {
|
||||
removeListener(event: 'error', cb: (msg: string, trace?: Nightmare.IStackTrace[]) => void): Nightmare;
|
||||
removeListener(event: 'timeout', cb: (msg: string) => void): Nightmare;
|
||||
screenshot(path: string): Nightmare;
|
||||
screenshot(path: string, clip: Object): Nightmare;
|
||||
html(path: string, saveType: string): Nightmare;
|
||||
html(path: string, saveType: 'HTMLOnly'): Nightmare;
|
||||
html(path: string, saveType: 'HTMLComplete'): Nightmare;
|
||||
@@ -134,6 +135,7 @@ declare namespace Nightmare {
|
||||
cookiesFile?: string;
|
||||
phantomPath?: string;
|
||||
show?: boolean;
|
||||
typeInterval?: number;
|
||||
}
|
||||
|
||||
export interface IRequest {
|
||||
|
||||
@@ -167,6 +167,11 @@ new Nightmare()
|
||||
.screenshot('test/test.png')
|
||||
.run(done);
|
||||
|
||||
new Nightmare()
|
||||
.goto('http://yahoo.com')
|
||||
.screenshot('test/test.png', { x: 10, y: 5, width: 10, height: 10})
|
||||
.run(done);
|
||||
|
||||
new Nightmare()
|
||||
.goto('http://yahoo.com')
|
||||
.pdf('test/test.pdf')
|
||||
|
||||
Reference in New Issue
Block a user