0

I was using a script to extract some data from the italian morningstar website and it was working fine. Although since few months, it is appearing a pop-up (caches) straight when I open the webpage.

I used to handle the pop-up by referencing the html element and close it. This method was working fine for a while, then I don't know why since few weeks ago every time I close the popup by accepting all the cookies and I browse into the webpage it continues to reappear (Even if I try to close the pop-up manually!).

If I navigate through Chrome, once I accept the cookies it stops showing, but with selenium webdriver if I accept the cookies the popup continues to show in the same internet session. I tried everything, including importing all the cookies from Chrome but nothing changed.

Do you have a suggestion?

Here is the pop-up showing

Zakiirim
  • 11
  • 2

2 Answers2

0

You can switch to pop up and close it if its a html popup. If its not, you must use some autoit/automac or something similar depending on the platform.

Nitin_k29
  • 341
  • 1
  • 3
  • 7
0

You coud try something like

     public static void PopUp()
    {
        _webDriver.SwitchTo().Alert().Accept();
    }
Armygrad
  • 53
  • 5