This repository was archived by the owner on Oct 29, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -573,6 +573,17 @@ Opens the passed URL in a new tab.
573
573
574
574
** Returns:** ` Promise ` <` Promise ` <` boolean ` >>
575
575
576
+ ___
577
+ <a id =" scrollbottom " ></a >
578
+
579
+ #### scrollBottom
580
+
581
+ ▸ ** scrollBottom** (): ` Promise ` <` void ` >
582
+
583
+ Scrolls to the bottom of the window.
584
+
585
+ ** Returns:** ` Promise ` <` void ` >
586
+
576
587
___
577
588
<a id =" scrolltop " ></a >
578
589
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ import * as webdriver from 'selenium-webdriver';
3
3
* Scrolls to the top of the window.
4
4
*/
5
5
export declare function scrollTop ( ) : webdriver . promise . Promise < void > ;
6
+ /**
7
+ * Scrolls to the bottom of the window.
8
+ */
9
+ export declare function scrollBottom ( ) : webdriver . promise . Promise < void > ;
6
10
/**
7
11
* Closes a browser window, popup, or tab identified by its zero-based index.
8
12
* If two windows are open and the second window is to be closed, the index
Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ function scrollTop() {
15
15
return protractor_1 . browser . executeScript ( 'window.scrollTo(0,0);' ) ;
16
16
}
17
17
exports . scrollTop = scrollTop ;
18
+ /**
19
+ * Scrolls to the bottom of the window.
20
+ */
21
+ function scrollBottom ( ) {
22
+ return protractor_1 . browser . executeScript ( 'window.scrollTo(0, document.body.scrollHeight);' ) ;
23
+ }
24
+ exports . scrollBottom = scrollBottom ;
18
25
/**
19
26
* Closes a browser window, popup, or tab identified by its zero-based index.
20
27
* If two windows are open and the second window is to be closed, the index
Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ export function scrollTop(): webdriver.promise.Promise<void> {
15
15
return browser . executeScript ( 'window.scrollTo(0,0);' ) ;
16
16
}
17
17
18
+ /**
19
+ * Scrolls to the bottom of the window.
20
+ */
21
+ export function scrollBottom ( ) : webdriver . promise . Promise < void > {
22
+ return browser . executeScript (
23
+ 'window.scrollTo(0, document.body.scrollHeight);'
24
+ ) ;
25
+ }
26
+
18
27
/**
19
28
* Closes a browser window, popup, or tab identified by its zero-based index.
20
29
* If two windows are open and the second window is to be closed, the index
You can’t perform that action at this time.
0 commit comments