One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
/** | |
* From David Ridgley | |
* https://github.com/Arximiro | |
*/ | |
// Define a custom command | |
browser.addCommand('fillInput', function (el, val) { | |
browser.waitUntil(function () { | |
el.click(); | |
return el.isFocused(); |
var libxmljs = require("libxmljs"); | |
var xml = [ | |
'<?xml version="1.0" encoding="utf-8"?>', | |
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">', | |
' <soap:Body>', | |
' <Response xmlns="http://tempuri.org/">', | |
' <Result>', | |
' <client xmlns="">', | |
' <msg>SEARCH OK.</msg>', | |
' <code>0</code>', |
/** | |
* With this helper you can start emulators from the command line with some easy questions. | |
* It will automatically list all AVD's that you've configuered on your machine. | |
* | |
* NOTE 1: MAKE SURE YOU'VE ADDED inquirer WITH `npm install inquirer --D` TO YOUR DEV DEPENDENCIES | |
* NOTE 2: MAKE SURE YOU'VE SETUP UP YOUR ENVIRONMENT CORRECTLY WITH ALL THE ENVIRONMENT VARIABLES NEEDED | |
* FOR MAKING ANDROID WORK ON YOUR MACHINE | |
* NOTE 3: MAKE SURE YOU'VE SET THE `ANDROID_EMULATOR_PATH` TO THE CORRECT PATH ON YOUR MACHINE | |
* WHERE ALL THE EMULATORS ARE LISTED | |
* |
/** | |
* Here you'll find some swipe methods for a native iOS or Android app | |
* which can be used when you are using webdriver.io | |
* | |
* I work a lot based on percentages, so it is working on all screens and all devices | |
* and I hope you understand how to use it based on the docs. | |
* | |
* Feel free to use it for all kinds of purposes, a star is much appreciated ;-) | |
* | |
* Grtz, |
/** | |
* To scroll into view for an element as a workaround for chromedriver issue | |
* @param {Object} selector - CSS selector only | |
* | |
* */ | |
export default function scrollToElement(selector) { | |
let viewportObj = browser.getViewportSize(); | |
let viewportHeight = viewportObj.height; | |
let viewportWidth = viewportObj.width; |
class Swipe { | |
static swipeRight(selector) { | |
if (!selector) { | |
browser.touchAction([{action: 'press', x: 0, y: 100}, {action: 'moveTo', x: 200, y: 100}, 'release']); | |
} else { | |
let startX = $(selector).getLocation().x; | |
let endX = startX + 200; | |
let y = $(selector).getLocation().y; |
btn Button chk CheckBox ckl CheckedListBox | |
cmb ComboBox dtp DateTimePicker lbl Label | |
llb LinkLabel lst ListBox lvw ListView | |
mtx MaskedTextBox cdr MonthCalendar icn NotifyIcon | |
nud NumeircUpDown pic PictureBox prg ProgressBar | |
rdo RadioButton rtx RichTextBox txt TextBox | |
tip ToolTip tvw TreeView wbs WebBrowser | |
容器 | |
flp FlowLayoutPanel grp GroupBox pnl Panel |
node_modules | |
*.swp |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');
Those suck for maintenance and they're ugly.