Module 22 [POM] - Part -4 Example Facebook | Selenium Forum
M
Posted on 08/01/2017
Hi Ashish,
After successfully login into Facebook. I try to click on my Profile. As per video suggest in my "BaseTest.java" class i put Webdriver and Properties static i.e. [b:3gb0ed80]public static WebDriver driver = null; public static Properties prop = null;[/b:3gb0ed80] to avoid create of the new instance of the webdriver.but when i run my project after login, it again open a blank browser due to that control is not able to goto my landing page and click on my profile pic.

I attached my project, please suggest me where i am wrong.

NOTE:- Please use your login credentials to test this.

M
Replied on 08/01/2017

is old browser closed?


M
Replied on 09/01/2017

No, Old Browser is still open.


M
Replied on 09/01/2017

please suggest.


M
Replied on 10/01/2017

i'll have to look into your project.

when can come on skype? give me a time.


M
Replied on 10/01/2017

Today 9 PM, is it ok for you?


M
Replied on 10/01/2017

?


M
Replied on 10/01/2017

how about tommorow(wed) 9 pm IST?


M
Replied on 10/01/2017

No Issue. we will discuss tomorrow(wed) 9 pm IST.

Thanks.


M
Replied on 11/01/2017

Gentle Reminder..

Today(wed) 9 pm IST.


M
Replied on 11/01/2017

Hi Ashish,
I am waiting for you from last 30 min. plz reply..


M
Replied on 11/01/2017

I'm sorry, sam. I fell ill yesterday so couldn't come to skype.


M
Replied on 11/01/2017

come today(thu) at 9 pm.


M
Replied on 12/01/2017

what is your skype id?


M
Replied on 17/01/2017

Hi Ashish,
Sorry for late reply. Can we discussed tomorrow(Wednesday) 9.PM IST.
Please tell me your availability.
Waiting for your reply.

Skype Id :- sumit.bhasin661


M
Replied on 17/01/2017

Please Update?


M
Replied on 17/01/2017

I'm busy today, how about tomorrow(thur) at 9 pm?


M
Replied on 17/01/2017

Ok. Tomorrow is fixed (wed) 9 pm IST.


M
Replied on 18/01/2017

tomorow is thursday.


M
Replied on 18/01/2017

Sorry my mistake. i will be available tomorrow(Thur) at 9 PM


M
Replied on 19/01/2017

Hi Ashish,
As per our discussion on Skype call, i am sending you POM project so please look into this.


Regards
Sumit Bhasin


M
Replied on 19/01/2017

I found your problem. you're using a constructor in BaseTest.java to initialise Webdriver.

whenever a new instance of loginpage.java or landingpage.java is created, the constructor in BaseTest.java runs and it starts a new firefox. hence the error.

I would suggest moving the driver initialisation to a function and only call that function once.