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
32 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
• 16,440 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,400 points
3,988 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
• 10,510 points
36 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
• 10,510 points
92 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,050 points
263 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
629 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
258 views
0 votes
1 answer
0 votes
1 answer