asialgearoid / cordova-appium-example Goto Github PK
View Code? Open in Web Editor NEWA simple Cordova app showing how to test using Appium and WebdriverIO
License: MIT License
A simple Cordova app showing how to test using Appium and WebdriverIO
License: MIT License
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);
})
});
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.