title: How to design custom action method in Selenium Grid architecture
body: <p>I have a very basic question related to how to design method for executing selenium GRID.</p>
  
  <p>In the current implementation of selenium framework in my project, we have created an action class which includes all selenium WebElelement actions in a static format.
  For sequential script execution, there is no issue. But for parallel script execution, I heard that we can't design a method as static as only one copy will be created. Then, how to write custom action method which we can use in other classes.  </p>
  
  <p>Could you please advise on this.</p>
  
  <p><strong>Current Implementation:</strong></p>
  
  <pre><code>public class ActionUtil{
  public static void selectByVisibleText(WebElement element, String visibleText, String elementName)
     {
      try {
          Select oSelect = new Select(element);
          oSelect.selectByVisibleText(text);
          log.info(text + " text is selected on " + elementName);
      } catch (Exception e) {
          log.error("selectByVisibleText action failed.Exception occured :" + e.toString());
      }
   }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Use of 'selectByVisibleText' static method in other page classes:</strong></p>
  
  <pre><code>public void selectMemorableQuestion1(String question) {
      ActionUtil.selectByVisibleText(memorableQuestion1, question, "memorableQuestion1");
  }
  </code></pre>