Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

1 like 0 dislike
327 views
by The go-to Tester (324 points)

How to get the name of browser using Web Driver?

Please explain with code.

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)

You can simply use

 

driver.getTitle()

 

to get name/title of the browser.

 

Hope that helps.

by The go-to Tester (324 points)
is it for window title?
by The go-to Tester (181 points)
Yes, That code is for the browser window title. Is that what you asked for?
by The go-to Tester (324 points)
Yes, thank you!


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...