title: Getting Null value in driver in actions, what to do now
body: <pre><code>public class ProductGridPage {
  
      private static  WebDriver driver;
  
      public ProductGridPage(WebDriver driver_param) {
          driver = driver_param;
          PageFactory.initElements(driver, this);
      }
      
      BrowserActions b = new BrowserActions(driver);
      
      @FindBy(how = How.XPATH, using = &quot;//*[@id=\&quot;center_column\&quot;]/ul/li/div/div[1]/div/a[1]/img&quot;)
      public WebElement photo ;
      
      @FindBy(how = How.XPATH, using = &quot;/[@id=\&quot;center_column\&quot;]/ul/li/div/div[2]/div[2]/a[2]/span&quot;)
      public WebElement btn ;
  </code></pre>
  <p>I'm getting null value in the below driver in the declaration of actions , what should I do now
  to initialize this driver and to resolve this issue</p>
  <pre><code>    {
          Actions action = new Actions(driver);
          action.moveToElement(photo).perform();
  
      }
      
      public void click_on_photo( WebDriver driver){
          b.Wait(driver, btn);
          btn.click();
      }
  }   
  </code></pre>