Extract text from div element in Modal window cause Failed to switch driver context

Hi
I am trying to extract text from a Modal window > div element which contains a sentence, all I need from this sentence is the URL

I have this issue:

  • I tried Get Text action but every time I ran the step I get this:

Failed to switch driver context to [CSSSELECTOR·=·div#modalUrl·.modal-body]

I do not know what the problem is here, but I can use Contain any text normally, and also added wait time to give 2000 ms for the element to be displayed.

How can I do this?

I also tried multiple selectors but nothing worked.

Can please someone help?