I want to get the line in the image below. It is inside a warning, prompt or dialogue. My code is written in Perl, and I use Selenium Webdriver to navigate the page.

What I have achieved so far:
- find the link with selenium and click on it
- Waiting for a warning.
- get string from warning but not string in textbox
the code
my $copy_elem = wait_until {
$d->find_element_by_id('clipboard-link');
};
$copy_elem->click;
select undef, undef, undef, 8.00;
my $alert = wait_until {
$d->get_alert_text;
};
$alert
"Copy link" is displayed
So the text I want is inside the alert text box. With get_alert_text, I get only the Alert string, but not the contents of the text field. I searched the Internet for answers and saw people using window handles to switch to a warning. I tried to find similar functions in the Selenium Webdriver documentation:
CPAN Selenium Webdriver Docu
, . get_current_window_handle . phantomjs chrome . , perl driver.switchto().alert();
.