title: How can call a method from another class for Test
body: <p>I'm trying to invoke a method from another class using java.
  So what i have is a class invoking log method from another class, it's working well.
  After this i want to invoke another method from another class to get current url.  </p>
  
  <p>So here my classe A and B</p>
  
  <p>question: how can i invoke the method to get thr current url?
  Thank you</p>
  
  <pre><code>public class A{
  
      private String url;
  
      public A(WebDriver driver){       
          url = driver.getCurrentUrl();
          System.out.println("The current URL is:"+url);
          Util.wait(5);
          }
  
  
  public class B {        
  
  @BeforeClass
      public static void Log(){
      //some code here to check if log is ok
      }
  @Test
      public void A(){
          A test1 = new A(driver);
          String url2 =test1.A();
  
      } 
  </code></pre>