-
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f927247
commit 88eb3b3
Showing
15 changed files
with
265 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/** | ||
* This class provides an abstraction layer for Selenium's action sequence functionality. | ||
* It allows for easy interaction with web elements using different locating strategies | ||
* and simulating complex user gestures like mouse movements, key presses, etc. | ||
* | ||
* @class | ||
* @hideconstructor | ||
* @see https://www.selenium.dev/documentation/webdriver/actions_api/ | ||
*/ | ||
export class Action { | ||
constructor(browser: any); | ||
/** | ||
* @private | ||
*/ | ||
private driver; | ||
/** | ||
* @private | ||
*/ | ||
private actions; | ||
clear(): Promise<any>; | ||
/** | ||
* Retrieves the current action sequence builder. | ||
* The actions builder can be used to chain multiple browser actions. | ||
* @returns {SeleniumActions} The current Selenium Actions builder object for chaining browser actions. | ||
* @example | ||
* // Example of using the actions builder to perform a drag-and-drop operation: | ||
* const elementToDrag = await commands.action.getElementByCss('.draggable'); | ||
* const dropTarget = await commands.action.getElementByCss('.drop-target'); | ||
* await commands.action.getAction() | ||
* .dragAndDrop(elementToDrag, dropTarget) | ||
* .perform(); | ||
* | ||
*/ | ||
getAction(): SeleniumActions; | ||
/** | ||
* Finds an element by its CSS selector. | ||
* | ||
* @param {string} name - The CSS selector of the element. | ||
* @returns {Promise<WebElement>} A promise that resolves to the WebElement found. | ||
*/ | ||
getElementByCss(name: string): Promise<WebElement>; | ||
/** | ||
* Finds an element by its ID. | ||
* | ||
* @param {string} id - The ID of the element. | ||
* @returns {Promise<WebElement>} A promise that resolves to the WebElement found. | ||
*/ | ||
getElementById(id: string): Promise<WebElement>; | ||
/** | ||
* Finds an element by its XPath. | ||
* | ||
* @param {string} xpath - The XPath query of the element. | ||
* @returns {Promise<WebElement>} A promise that resolves to the WebElement found. | ||
*/ | ||
getElementByXpath(xpath: string): Promise<WebElement>; | ||
/** | ||
* Finds an element by its class name. | ||
* | ||
* @param {string} className - The class name of the element. | ||
* @returns {Promise<WebElement>} A promise that resolves to the WebElement found. | ||
*/ | ||
getElementByClassName(className: string): Promise<WebElement>; | ||
/** | ||
* Finds an element by its name attribute. | ||
* | ||
* @param {string} name - The name attribute of the element. | ||
* @returns {Promise<WebElement>} A promise that resolves to the WebElement found. | ||
*/ | ||
getElementByName(name: string): Promise<WebElement>; | ||
} | ||
import { Actions as SeleniumActions } from 'selenium-webdriver'; | ||
import { WebElement } from 'selenium-webdriver'; | ||
//# sourceMappingURL=action.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* This class provides an abstraction layer for Selenium's action sequence functionality. | ||
* It allows for easy interaction with web elements using different locating strategies | ||
* and simulating complex user gestures like mouse movements, key presses, etc. | ||
* | ||
* @class | ||
* @hideconstructor | ||
* @see https://www.selenium.dev/documentation/webdriver/actions_api/ | ||
* @see https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/input_exports_Actions.html | ||
*/ | ||
export class Actions { | ||
constructor(browser: any); | ||
/** | ||
* @private | ||
*/ | ||
private driver; | ||
/** | ||
* @private | ||
*/ | ||
private actions; | ||
clear(): Promise<any>; | ||
/** | ||
* Retrieves the current action sequence builder. | ||
* The actions builder can be used to chain multiple browser actions. | ||
* @returns {SeleniumActions} The current Selenium Actions builder object for chaining browser actions. | ||
* @example | ||
* // Example of using the actions builder to perform a drag-and-drop operation: | ||
* const elementToDrag = await commands.action.getElementByCss('.draggable'); | ||
* const dropTarget = await commands.action.getElementByCss('.drop-target'); | ||
* await commands.action.getAction() | ||
* .dragAndDrop(elementToDrag, dropTarget) | ||
* .perform(); | ||
* | ||
*/ | ||
getActions(): SeleniumActions; | ||
} | ||
import { Actions as SeleniumActions } from 'selenium-webdriver/lib/input.js'; | ||
//# sourceMappingURL=actions.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* This class provides a way to get hokld of Seleniums WebElements. | ||
* @class | ||
* @hideconstructor | ||
*/ | ||
export class Element { | ||
constructor(browser: any); | ||
/** | ||
* @private | ||
*/ | ||
private driver; | ||
/** | ||
* Finds an element by its CSS selector. | ||
* | ||
* @param {string} name - The CSS selector of the element. | ||
* @returns {Promise<WebElement>} A promise that resolves to the WebElement found. | ||
*/ | ||
getByCss(name: string): Promise<WebElement>; | ||
/** | ||
* Finds an element by its ID. | ||
* | ||
* @param {string} id - The ID of the element. | ||
* @returns {Promise<WebElement>} A promise that resolves to the WebElement found. | ||
*/ | ||
getById(id: string): Promise<WebElement>; | ||
/** | ||
* Finds an element by its XPath. | ||
* | ||
* @param {string} xpath - The XPath query of the element. | ||
* @returns {Promise<WebElement>} A promise that resolves to the WebElement found. | ||
*/ | ||
getByXpath(xpath: string): Promise<WebElement>; | ||
/** | ||
* Finds an element by its class name. | ||
* | ||
* @param {string} className - The class name of the element. | ||
* @returns {Promise<WebElement>} A promise that resolves to the WebElement found. | ||
*/ | ||
getByClassName(className: string): Promise<WebElement>; | ||
/** | ||
* Finds an element by its name attribute. | ||
* | ||
* @param {string} name - The name attribute of the element. | ||
* @returns {Promise<WebElement>} A promise that resolves to the WebElement found. | ||
*/ | ||
getByName(name: string): Promise<WebElement>; | ||
} | ||
import { WebElement } from 'selenium-webdriver'; | ||
//# sourceMappingURL=element.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.