summaryrefslogtreecommitdiff
path: root/src/handlers/utils.js
blob: cf9fe389de4240485ca2674c2e1bc972959d5237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
const clickElementByXPath = (page, xPath) => page
  .waitForXPath(xPath)
  .then(item => item.click());

const clickElementBySelector = (page, selector) => page
  .waitForSelector(selector)
  .then(item => item.click());


module.exports = {
  clickElementByXPath,
  clickElementBySelector
};