power_settings_new

How to get the name of browser using Web Driver?

by (324 points)
asked
+1 vote
81 views

How to get the name of browser using Web Driver?

Please explain with code.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by (171 points)
0 votes

You can simply use

 

driver.getTitle()

 

to get name/title of the browser.

 

Hope that helps.

commented by (324 points)
is it for window title?
commented by (171 points)
Yes, That code is for the browser window title. Is that what you asked for?
commented by (324 points)
Yes, thank you!
add
...