How to use the protractor.by.xpath function in protractor

To help you get started, we’ve selected a few protractor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github topcoder-platform / community-app / topcoder-community-smoke-test / page-objects / pages / topcoder / challenge-listing / challenge-listing.helper.ts View on Github external
private static async verifyChallengesMatchingKeyword(filters: Array) {
        // need to sleep to wait for ajax calls to be completed to filter using the above keyword
        await browser.sleep(15000);

        const challenges = await ChallengeListingPageObject.challengeLinks;
        for (let i = 0; i < challenges.length; i++) {
            const parentDiv = challenges[i].element(by.xpath('..'));
            let skills = await parentDiv.all(by.css('button[type=button]'));

            // expand skills by clicking on the hidden `+x` button
            for (let i = 0; i < skills.length; i++) {
                const skill = await skills[i];
                const text = await skill.getText();
                if (text[0] == '+') {
                    await skill.click();
                }
            }

            skills = parentDiv.all(by.css('button[type=button]'));
            const skillsText = await skills.getText();
            expect(skillsText.filter((s: string) => {
                for (let j = 0; j < filters.length; j++) {
                    if (s.includes(filters[j])) {
github tmobile / jazz / core / jazz_ui / e2e / page-objects / jazzservices.po.ts View on Github external
getMetricesRequestCount() {
    return element(by.xpath('//div[contains(text(),"10")]'));
  }
  // Environment Locators
github tmobile / jazz / core / jazz_ui / e2e / page-objects / jazzservices.po.ts View on Github external
getDropDown() {
    return element(by.xpath('//div[text()="TIME RANGE"]/following-sibling::dropdown[@title="Select range"]/div[@class="dropdown"]/button[@class="btn dropdown-btn dropdown-toggle"]'));
  }
  getWeekVerify() {
github tmobile / jazz / core / jazz_ui / e2e / page-objects / jazzservices.po.ts View on Github external
btn_CreateBranch() {
    return element(by.xpath('//input[@id="create-branch-submit"]'));
  }
  bitUsername() {
github marklogic / marklogic-data-hub / web / e2e / page-objects / steps / steps.ts View on Github external
stepContainerDeleteButton(stepName: string) {
    return element(by.xpath(`//h3[@class="step-name" and contains(text(), "${stepName}")]/../div/div/mat-icon`));
  }
github marklogic / marklogic-data-hub / web / e2e / page-objects / dashboard / dashboard.ts View on Github external
clearFinalButton() {
    return element(by.xpath('//div[contains(text(),\' Final\')]/..//button'));
  }
github marklogic / marklogic-data-hub / web / e2e / page-objects / dashboard / dashboard.ts View on Github external
clearStagingButton() {
    return element(by.xpath('//div[contains(text(),\' Staging\')]/..//button'));
  }
github Alfresco / alfresco-ng2-components / e2e / pages / adf / dialog / contentListPage.ts View on Github external
checkRowIsSelected(content) {
        let isRowSelected = this.getRowsName(content).element(by.xpath(`ancestor::div[contains(@class, 'is-selected')]`));
        Util.waitUntilElementIsVisible(isRowSelected);
    }
github marklogic / marklogic-data-hub / web / e2e / page-objects / steps / masteringStep.ts View on Github external
matchThresholdOtherURI(name: string) {
    return element(by.xpath(`//mat-row[contains(@class, 'match-threshold-${name.toLowerCase()}')]
    //mat-cell//div//div//span[@class="action-label" and contains(text(), "URI")]/..`));
  }