How can I get Webdriver Session ID in Selenium?

0 votes
How can I get Webdriver Session ID in Selenium?
Jun 20 in Selenium by Nargis
633 views

1 answer to this question.

0 votes
Best answer

Hey Nargis, you can use following methods to get Webdriver SessionId in Selenium:

System.setProperty("webdriver.chrome.driver", "..//chromedriver.exe");

// Launching Chrome browser.

driver = new ChromeDriver();

SessionId sessionid = ((RemoteWebDriver) driver).getSessionId();

System.out.println(sessionid);
answered Jun 21 by Abha
• 27,180 points

Related Questions In Selenium

0 votes
1 answer

How do I get current URL in Selenium Webdriver using Python?

Use current_url element. Example: print browser.current_url READ MORE

answered Aug 8, 2018 in Selenium by Meci Matt
• 9,420 points
7,426 views
0 votes
1 answer

How can I create a POM test case in Selenium Webdriver?

Hey Akshay, follow these steps to create ...READ MORE

answered May 12 in Selenium by Anvi
• 13,960 points
77 views
0 votes
1 answer
0 votes
1 answer

How can I clear the text in a text box using Selenium WebDriver?

Hello Akriti, you can clear the text ...READ MORE

answered May 29 in Selenium by Anvi
• 13,960 points
307 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,110 points
977 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
1,131 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
874 views
0 votes
1 answer
0 votes
1 answer