Need Clarification

29 views
Skip to first unread message

Ramesh geddam

unread,
Apr 10, 2015, 3:44:00 PM4/10/15
to seleniu...@googlegroups.com
Hi,

The below code is clicking "Flights" link but its not opening the flights page, If i did manually also its not opening. but If i opened new Firefox browser and then click on "Flights" button its Opened.

Can you please suggest me, is there any browser settings required here??




public void FlighBookingExample(){
ProfilesIni oProfile = new ProfilesIni();
FirefoxProfile myProfile = oProfile.getProfile("RameshNewProfile");
oBrowser = new FirefoxDriver(myProfile);
oBrowser.findElement(By.linkText("Flights")).click();
}


With Regards,
Ramesh Geddam,

abhijit apte

unread,
Apr 13, 2015, 2:47:39 AM4/13/15
to seleniu...@googlegroups.com
You need to login to the website in order to access flights section. Selenium opens separate session of chrome and FF every time you execute it and separate session menace no cached objects.

By adding login related code should resolve it. 



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAJ%2BpDKV%3DMdbMYhR0K1i9N%2BRXuMQ93NLBmPfiO29ApnXr1jSavg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

pranab singh

unread,
Apr 13, 2015, 8:28:18 AM4/13/15
to seleniu...@googlegroups.com

Hi,
        Give some wait time to the page,to be loaded and it's gud to use xpath rather than!
Use- "//tbody/tr[2]/td[2]/a[text()='Flights']"
If doesn't work let me know.

sanu

Reply all
Reply to author
Forward
0 new messages