Use existing Firefox session in Selenium and Perl Use existing Firefox session in Selenium and Perl selenium selenium

Use existing Firefox session in Selenium and Perl


You want to specify a Firefox profile to use.

In Java, it'd be something like this...

ProfilesIni profile = new ProfilesIni();FirefoxProfile firefoxProfile = profile.getProfile("Default"); // might need to switch this around depending on what it actually is named.WebDriver driver = new FirefoxDriver(firefoxProfile);

(credit to this answer for the pseudo-code)


I think you can try with this option in perl driver.

my $handles = $driver->get_window_handles;   $driver->switch_to_window($handles->[1]);   $driver->close;   $driver->switch_to_window($handles->[0]);

I didn't use it, but may be it will help you!

For more information, please refer to this site.https://metacpan.org/pod/Selenium::Remote::Driver