javascript - Protractor: How I can stretching and replasing elements? -
and want emulate colums stretching. can change column headings places. want emulate to. think should use webdrivers methods. can't understand kind of.
it sounds use case draganddrop()
browser action:
browser.actions(). draganddrop(elm, {x: 400, y: 20}). perform();
you can drag , drop element element:
browser.actions(). draganddrop(elm, targetelm). perform();
and, fyi, here specification:
/** * convenience function performing "drag , drop" manuever. target * element may moved location of element, or offset (in * pixels). * @param {!webdriver.webelement} element element drag. * @param {(!webdriver.webelement|{x: number, y: number})} location * location drag to, either webelement or offset in pixels. * @return {!webdriver.actionsequence} self reference. */ webdriver.actionsequence.prototype.draganddrop = function(element, location) { return this.mousedown(element).mousemove(location).mouseup(); };
Comments
Post a Comment