import { Helper } from 'codeceptjs'; /** * Radio Button class */ export declare class DewElement extends Helper { /** * Give you the list of all the elements present in the Dom * * ```js * DewElement.getListOfElements("/div"); * ``` * * @param {String} locator located by xpath|CSS * */ static getListOfElements(locators: string): Promise; /** * Give you the element present in the Dom * * ```js * DewElement.getElement("/div"); * ``` * * @param {String} locator located by xpath|CSS * */ static getElement(locators: string): Promise; /** * Give you the visible element from the Dom * * ```js * DewElement.getVisibleElement("/div"); * ``` * * @param {String} locator located by xpath|CSS * */ static getVisibleElement(locators: string): Promise; /** * Give you the list of all the elements present in the Dom * * ```js * DewElement.getNumberOfElementsPresentInDom("//div"); * ``` * * @param {String} locator {String} locator located by xpath|CSS * */ static getNumberOfElementsPresentInDom(locators: string): Promise; /** * check whether element is present in the Dom * * ```js * DewElement.checkIfElementPresent("//div"); * ``` * * @param {String} locator located by xpath|CSS * */ static checkIfElementPresent(locator: string): Promise; /** * check whether element is visible or not * * ```js * DewElement.checkIfElementVisible("//div"); * ``` * * @param {String} locator located by xpath|CSS * */ static checkIfElementVisible(locator: string): Promise; /** * replace value from xpath and return newly formed xpath * * ```js * DewElement.getDynamicLocator("//div/<>","abc","button"); * * Result : "//div//button * ``` * * @param {String} locator located by xpath|CSS * @param {String} oldValue value in xpath|CSS that needs to be replaced * @param {String} newValue value that will be replaced in xpath|CSS * @param {String} oldValue1 value in xpath|CSS that needs to be replaced * @param {String} newValue1 value that will be replaced in xpath|CSS * */ static getDynamicLocator(locator: string, oldValue: string, newValue: string, oldValue1?: string, newValue1?: string): Promise; /** * Verifies if element is visible * * ```js * DewElement.verifyIfISeeElement("//div[contains(@class,'welcome-message')]"); * ``` * * @param {String} locator located by xpath|CSS * */ static verifyIfISeeElement(locator: string): Promise; /** * Verifies if element is not visible * * ```js * DewElement.verifyIfIDontSeeElement("//div[contains(@class,'welcome-message')]"); * ``` * * @param {String} locator located by xpath|CSS * */ static verifyIfIDontSeeElement(locator: string): Promise; /** * Verifies if text is visible * * ```js * DewElement.verifyIfISeeText("Apple"); * ``` * * @param {String} text to be visible * */ static verifyIfISeeText(text: string): Promise; /** * Verifies if text is not visible * * ```js * DewElement.verifyIfIDontSeeText("Apple"); * ``` * * @param {String} text to be not visible * */ static verifyIfIDontSeeText(text: string): Promise; /** * Verifies if element is present in DOM * * ```js * DewElement.verifyIfISeeElementInDOM("//input[@id='login']"); * ``` * * @param {String} locator located by xpath|CSS * */ static verifyIfISeeElementInDOM(locator: string): Promise; /** * Verifies if all elements have given attributes * * ```js * DewElement.verifyIfISeeAttributeOnElements('//form', { method: "post"}"); * ``` * * @param {String} locator located by xpath|CSS * @param {any} attribute * */ static verifyIfISeeAttributeOnElements(locator: string, attribute: any): Promise; /** * Verifies if specified checbox is checked * * ```js * DewElement.verifyIfISeeCheckboxIsChecked("//input[@id='purchaseType']"); * ``` * * @param {String} locator located by xpath|CSS * */ static verifyIfISeeCheckboxIsChecked(locator: string): Promise; /** * Verify if current URL does not contain a fragment provided by user * @param {string} locator */ static verifyIDontSeeInCurrentUrl(locator: string): Promise; /** * Verifies if current URL equals to provided one * * ```js * DewElement.verifyIfISeeElementInDOM("./register"); * ``` * * @param {String} URLPart * */ static verifyIfISeeCurrentURLEquals(URLPart: string): Promise; /** * Verifies if current URL contains the part provided by user * * DewElement.verifyIfISeeInCurrentUrl("author") * @param {string} URLPart */ static verifyIfISeeInCurrentUrl(URLPart: string): Promise; /** * Verifies if input field equals to given value * * ```js * DewElement.verifyIfISeeElementInDOM("Username","John"); * ``` * * @param {String} locator located by xpath|CSS * @param {String} value */ static verifyIfISeeInField(locator: string, value: string): Promise; /** * Verifies if active popup contains given string * * ```js * DewElement.verifyIfISeeInPopup("Home"); * ``` * * @param {String} text * */ static verifyIfISeeInPopup(text: string): Promise; /** * Verifies if title contains text * * ```js * DewElement.verifyIfISeeElementInDOM("Home Page"); * ``` * * @param {string} title * */ static verifyIfISeeInTitle(title: string): Promise; /** * Verifies if element applear number of times in DOM * * ```js * DewElement.verifyIfISeeElementInDOM('.buttons', 3); * ``` * @param {string} locator element located by CSS|XPath|strict locator. * @param {number} numberOfElements number of elements. * */ static verifyIfISeeNumberOfElements(locator: string, numberOfElements: number): Promise; /** * Verifies if an element is present given number of times * * ```js * DewElement.verifyIfISeeNumberOfVisibleElements('.buttons', 3); * ``` * * @param {string} locator element located by CSS|XPath|strict locator. * @param {number} numberOfElements number of elements. */ static verifyIfISeeNumberOfVisibleElements(locator: string, numberOfElements: number): Promise; /** * Verifies if text is equal to provided one * * ```js * DewElement.verifyIfTextEquals("text", "h1"); * ``` * * @param {string} actualText element value to check. * @param {string?} expectedText element located by CSS|XPath|strict locator. * */ static verifyIfTextEquals(actualText: string, expectedText: string): Promise; /** * Verifies if title is equal to provided one * * ```js * DewElement.verifyIfTitleEquals("Test title"); * ``` * * @param {String} title to check * */ static verifyIfTitleEquals(title: string): Promise; /** *Grab number of visible elements by locator. * * ```js *let hint = await DewElement.grabNumberOfVisibleElements('#tooltip'); * ``` * * @param {String} locator by CSS|XPath|strict locator. * */ static grabNumberOfVisibleElements(locator: string): Promise; /** * Retrieves a text from an element located by CSS or XPath and returns it to test. Resumes test execution, so should be used inside async with await operator. * * ```js * let pin = await DewElement.grabTextFrom('#pin'); * ``` * * @param {String} locator by CSS|XPath|strict locator. * */ static grabTextFrom(locator: string): Promise; /** * Retrieves an attribute from an element located by CSS or XPath and returns it to test. * * ```js *let hint = await DewElement.grabAttributeFrom('#tooltip', 'title'); * ``` * * @param {String} locator by CSS|XPath|strict locator. * @param {String} attribute string attribute name. * */ static grabAttributeFrom(locator: string, attribute: string): Promise; /** * Retrieves a value from a form element located by CSS or XPath and returns it to test. * * ```js *let email = await DewElement.grabValueFrom('input[name=email]'); * ``` * * @param {String} locator by CSS|XPath|strict locator. * */ static grabValueFrom(locator: string): Promise; /** * Checks that cookie with given name does not exist * * ```js * DewElement.verifyIfIDontSeeCookie('auth'); * ``` * @param {string} cookieName * */ static verifyIfIDontSeeCookie(cookieName: string): Promise; /** * Checks that current url is not equal to provided one. If a relative url provided, a configured url will be prepended to it. * * ```js * DewElement.verifyIfIDontSeeCurrentUrlEquals('http://mysite.com/login'); * ``` * @param {string} url * */ static verifyIfIDontSeeCurrentUrlEquals(url: string): Promise; /** * Checks that element is not on page. * * ```js * DewElement.verifyIfIDontSeeElementInDOM('.nav'); * ``` * @param {string} locator located by CSS|XPath|Strict locator. * */ static verifyIfIDontSeeElementInDOM(locator: string): Promise; /** * Checks that title does not contain text. * * ```js * DewElement.verifyIfIDontSeeInTitle('Error'); * ``` * @param {string} text value to check. * */ static verifyIfIDontSeeInTitle(text: string): Promise; /** * Checks that value of input field or textarea doesn't equal to given value * * ```js * DewElement.verifyIfIDontSeeInField({ css: 'form input.email' }, 'user@user.com'); * ``` * @param {string} locator located by label|name|CSS|XPath|strict locator. * @param {string} value string value to check * */ static verifyIfIDontSeeInField(locator: string, value: string): Promise; /** * Checks that the current page does not contains the given string in its raw source code. * * ```js * DewElement.verifyIfIDontSeeInSource('