Element MyElement is not clickable at point (x, y)… Other element would receive the click

后端 未结 5 1585
天命终不由人
天命终不由人 2020-11-21 04:42

I am trying to make some tests using selenium based Katalon Studio. In one of my tests I have to write inside a textarea. The problem is that I get the following error:

5条回答
  •  情话喂你
    2020-11-21 04:59

    Try Thread.Sleep()

    Implicit - Thread.Sleep()

    So this isn’t actually a feature of Selenium WebDriver, it’s a common feature in most programming languages though. But none of that matter.

    Thread.Sleep() does exactly what you think it does, it’s sleeps the thread. So when your program runs, in the majority of your cases that program will be some automated checks, they are running on a thread. So when we call Thread.Sleep we are instructing our program to do absolutely nothing for a period of time, just sleep. It doesn’t matter what our application under test is up to, we don’t care, our checks are having a nap time!

    Depressingly though, it’s fairly common to see a few instances of Thread.Sleep() in Selenium WebDriver GUI check frameworks. What tends to happen is a script will be failing or failing sporadically, and someone runs it locally and realises there is a race, that sometimes WedDriver is losing. It could be that an application sometimes takes longer to load, perhaps when it has more data, so to fix it they tell WebDriver to take a nap, to ensure that the application is loaded before the check continues.

    Thread.sleep(5000);

    The value provided is in milliseconds, so this code would sleep the check for 5 seconds.

提交回复
热议问题