Guys Please help:
I am trying to call a non static method from the main static method but I get an error my code is:
Could you please tell me if there is a work around.public class ClassRc1 extends ConfigClass { public DefaultSelenium browser; public static void main(String[] args) throws FileNotFoundException, IOException, InterruptedException{ changephoto(); } public void login() throws FileNotFoundException, IOException, InterruptedException { super.connect(); String url=super.config.getProperty("url"); String username=super.config.getProperty("username"); String password=super.config.getProperty("password"); browser= new DefaultSelenium("localhost",4444 , "*firefox", "http://"+url); browser.start(); browser.open("/"); browser.windowMaximize(); browser.type("//*[@id='email']", username); browser.type("//*[@id='pass']", password); } public void changephoto() throws FileNotFoundException, IOException, InterruptedException{ login(); browser.click("//*[@id='u_0_f']"); } }
Thanks in advance