I am experimenting with Selenium, simulating the human process of navigating a webpage with Chrome to retrieve information. The first step is:
String baseUrl = "https://aps.bde.es/cir_www";
driver.get(baseUrl);
System.out.println(driver);
The destination url opens a pop up straight away, and it is impossible to inspect the page or the pop up, so it is not possible to check the underlying code. The pop up is not recognised as an alert and no secondary handle is identified:
Set<String> handles = driver.getWindowHandles(); // get all window handles
System.out.println(handles);
Output:
[CDwindow-DDBF15016292510EDC6E84A50918E1C8]
[CDwindow-DDBF15016292510EDC6E84A50918E1C8]
The pop up contains a list of digital certificates, and it is necessary to select one of them to gain access to the webpage. Even if I gain access to the pop up window, the following problem will be to select one of the certificates without any information about the pop up. I guess I will have to try to select one of the digital certificates with Id.partialLinkText(...) or similar. Anyway, my initial problem is how to get my driver to handle the pop up. Although I am using Selenium, probable there are other options and one of them may be more adequate for my present problem. Any help will be greatly appreciated. I have already consulted references like https://www.softwaretestinghelp.com/handle-alerts-popups-selenium-webdriver-selenium-tutorial-16/ and How to handle Pop-up in Selenium WebDriver using Java without success. A robot is not an option, as the certificate of interest will be in a different position within the list depending on the number of certificates and their alphabetical order. I have tagged the question with 'Python' also as Selenium is a common library that probably works in a similar way in both languages, so suggestions from Python may help me too or even make me consider switching to Python.
Thanks.