Giter Site home page Giter Site logo

cordova-appium-example's People

Contributors

asialgearoid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

cordova-appium-example's Issues

How does one scroll

I took the demo app here,

added a div that had 5000px of padding. then tried to scroll down to the bottom to see if it were there, i was unable to get scrolling to work. Do you have any ideas? I'm very new to this.

// When run by webdriver.io, `browser` is a global object

// "describe" is a wrapper used to group related tests. It makes the output from the
// test reporter much easier to read through.
var webdriver = require('webdriverio');
var driver = new webdriver.Builder().

describe('Toggle Button', () => {
    // As the name suggests, this runs before each test. It is a good place to set
    // up common settings.
    beforeEach(() => {
        // Wait up to 5 seconds for commands to work
        browser.timeouts('implicit', 5000);
    });

    // It is important that we run each test in isolation. The running of a previous test
    // should not affect the next one. Otherwise, it could end up being very difficult to
    // track down what is causing a test to fail.
    afterEach(() => {
        browser.reload();
    });

    // it('should hide the text box', () => {
    //     // All of wdio's commands are synchronous, which means we can write them simply
    //     // one after another.
    //     browser.click('#showHideButton');
    //     expect(browser.isVisible('#textBox')).toBe(false);
    // });
    //
    // // "it" represents one test. It is best not to try to test too much inside one "it",
    // // as it can make it difficult to track down the mistake if the test fails.
    // it('should show the box by default', () => {
    //     // "expect" is the way to tell Jasmine what you are really trying to test.
    //     // If the expect function fails, your test will fail, and it will tell you why.
    //     expect(browser.isVisible('#textBox')).toBe(true);
    // });

    it('Scroll down the page', () => {
        // "expect" is the way to tell Jasmine what you are really trying to test.
        // If the expect function fails, your test will fail, and it will tell you why.

        driver.element("id", "end").then((element)=>{
            browser.execute('mobile: scroll', {element: element});
            expect(browser.isVisible('#end')).toBe(true);
        })



    });
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.