text: import { When } from 'cucumber';
  
  import clearInputField from '../support/action/clearInputField';
  import clickElement from '../support/action/clickElement';
  import mightClickElement from '../support/action/mightClickElement';
  import clickAllElements from '../support/action/clickAllElements';
  import clickContainingText from '../support/action/clickContainingText';
  import closeLastOpenedWindow from '../support/action/closeLastOpenedWindow';
  import deleteCookies from '../support/action/deleteCookies';
  import dragElement from '../support/action/dragElement';
  import focusLastOpenedWindow from '../support/action/focusLastOpenedWindow';
  import handleModal from '../support/action/handleModal';
  import moveTo from '../support/action/moveTo';
  import pause from '../support/action/pause';
  import pressButton from '../support/action/pressButton';
  import scroll from '../support/action/scroll';
  import selectOption from '../support/action/selectOption';
  import selectOptionByIndex from '../support/action/selectOptionByIndex';
  import setCookie from '../support/action/setCookie';
  import setInputField from '../support/action/setInputField';
  import setPromptText from '../support/action/setPromptText';
  import uploadFile from '../support/action/uploadFile';
  import backForward from '../support/action/backForward';
  
  When(
      /^I (click|doubleclick) on the (link|button|element) "([^"]*)?"$/,
      clickElement
  );
  
  When(
      /^I might click on the (link|button|element) "([^"]*)?"$/,
      mightClickElement
  );
  
  When(
      /^I click on all the elements "([^"]*)?"$/,
      clickAllElements
  );
  
  When(
      // use only when XPath doesn't work
      /^I click on the element "([^"]*)?" containing the text "([^"]*)?"$/,
      clickContainingText
  );
  
  When(
      /^I (add|set|type) "([^"]*)?" to the input field "([^"]*)?"$/,
      setInputField
  );
  
  When(
      /^I clear the input field "([^"]*)?"$/,
      clearInputField
  );
  
  When(
      /^I drag element "([^"]*)?" to element "([^"]*)?"$/,
      dragElement
  );
  
  When(
      /^I pause for (\d+)ms$/,
      pause
  );
  
  When(
      /^I set a cookie "([^"]*)?" with the content "([^"]*)?"$/,
      setCookie
  );
  
  When(
      /^I delete the cookie "([^"]*)?"$/,
      deleteCookies
  );
  
  When(
      /^I press "([^"]*)?"$/,
      pressButton
  );
  
  When(
      /^I (accept|dismiss) the (alertbox|confirmbox|prompt)$/,
      handleModal
  );
  
  When(
      /^I enter "([^"]*)?" into the prompt$/,
      setPromptText
  );
  
  When(
      /^I scroll to element "([^"]*)?"$/,
      scroll
  );
  
  When(
      /^I close the last opened (window|tab)$/,
      closeLastOpenedWindow
  );
  
  When(
      /^I focus the last opened (window|tab)$/,
      focusLastOpenedWindow
  );
  
  When(
      /^I select the (\d+)(st|nd|rd|th) option for element "([^"]*)?"$/,
      selectOptionByIndex
  );
  
  When(
      /^I select the option with the (name|value|text) "([^"]*)?" for element "([^"]*)?"$/,
      selectOption
  );
  
  When(
      /^I upload the file "([^"]*)?" into the element "([^"]*)?"$/,
      uploadFile
  );
  
  When(
      /^I move to element "([^"]*)?"(?: with an offset of (\d+),(\d+))*$/,
      moveTo
  );
  
  When(
      /^I go (back|forward)$/,
      backForward
  );
  