# Random error on allocating element when Click Element

**URL:** <https://forum.robotframework.org/t/random-error-on-allocating-element-when-click-element/2726>\
**Category:** Robot Framework\
**Created:** [4 November 2021 17:35 UTC](https://forum.robotframework.org/t/random-error-on-allocating-element-when-click-element/2726 "2021-11-04T17:35:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakar](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/jakar/32/1052_2.png) [@jakar](https://forum.robotframework.org/u/jakar)\
**Post date:** [4 November 2021 17:35 UTC](https://forum.robotframework.org/t/random-error-on-allocating-element-when-click-element/2726/1 "2021-11-04T17:35:23Z")

</div>

Hi, I have an not 100% reproducible issue when try to Click Element

Some details: web page developed with [Vue.js](https://vuejs.org/)  
I user element ID to allocate it.  
Also I use Wait Until Element Is Visible and Wait Until Element Enabled etc.  
Nothing helps to have 100% pass, sometimes it fails due to element click intercepted.  
To avoid the error I also try to use  
Set Selenium Speed (0.4s) and Set Selenium Implicit Wait (10s) - it helps a little but not 100%.

**Could you please suggest a way to avoid ‘element click intercepted’ error?**

```
pip list | grep selenium     
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary 5.1.3
selenium 4.0.0

```

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/b/bbedc13ca4f3c32d9d2694addccda7192e76fb4c.png)

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [4 November 2021 18:17 UTC](https://forum.robotframework.org/t/random-error-on-allocating-element-when-click-element/2726/2 "2021-11-04T18:17:41Z")

</div>

Try SeleniumTestability plugin for SeleniumLibrary.

(consider uninstalling Selenium2Library)

---

<div class="post-metadata">

**Author:** ![jakar](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/jakar/32/1052_2.png) [@jakar](https://forum.robotframework.org/u/jakar)\
**Post date:** [5 November 2021 11:26 UTC](https://forum.robotframework.org/t/random-error-on-allocating-element-when-click-element/2726/3 "2021-11-05T11:26:31Z")

</div>

The description SeleniumTestability sounds great.  
I installed accordingly documentation, remove selenium2library.  
pip list | grep selenium  
robotframework-seleniumlibrary 5.1.3  
robotframework-seleniumtestability 1.1.0  
selenium 4.0.0

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/e/e0be13152788bbb5e6d2a62ff30574ccb0dd58f7.png)

[ERROR] Error in file ‘/Users/abc/development/project-ui-autotest/Resources/resource.robot’ on line 3: Initializing library ‘SeleniumLibrary’ with arguments [plugins=SeleniumTestability;True;30 Seconds;True] failed: Importing test library ‘SeleniumTestability’ failed: AttributeError: type object ‘DesiredCapabilities’ has no attribute ‘PHANTOMJS’  
Traceback (most recent call last):  
File “/Users/abc/venvs/project-auto/lib/python3.9/site-packages/SeleniumTestability/ **init**.py”, line 2, in   
from .plugin import SeleniumTestability  
File “/Users/abc/venvs/project-auto/lib/python3.9/site-packages/SeleniumTestability/plugin.py”, line 43, in   
class SeleniumTestability(LibraryComponent):  
File “/Users/abc/venvs/project-auto/lib/python3.9/site-packages/SeleniumTestability/plugin.py”, line 148, in SeleniumTestability  
“phantomjs”: DesiredCapabilities.PHANTOMJS,  
PYTHONPATH:  
/Users/abc/venvs/project-auto/bin  
/Library/Frameworks/Python.framework/Versions/3.9/lib/python39.zip  
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9  
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload  
/Users/abc/venvs/project-auto/lib/python3.9/site-packages  
Tests.Search

* * *

Base search works properly | FAIL |  
Parent suite setup failed:  
No keyword with name ‘Open Browser’ found.

* * *

Tests.Search | FAIL |  
Suite setup failed:  
No keyword with name ‘Open Browser’ found.

Also suite teardown failed:  
No keyword with name ‘Close All Browsers’ found.

1 test, 0 passed, 1 failed

* * *

Tests | FAIL |  
10 tests, 0 passed, 10 failed

* * *

---

<div class="post-metadata">

**Author:** ![jakar](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/jakar/32/1052_2.png) [@jakar](https://forum.robotframework.org/u/jakar)\
**Post date:** [5 November 2021 12:49 UTC](https://forum.robotframework.org/t/random-error-on-allocating-element-when-click-element/2726/4 "2021-11-05T12:49:55Z")

</div>

I found this thread [https://groups.google.com/g/robotframework-users/c/T1peTfTftWM](https://groups.google.com/g/robotframework-users/c/T1peTfTftWM)

@HelioGuilherme66  
Is there is a way to add plugins=SeleniumTestability without installing PHANTOMJS?

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [5 November 2021 13:11 UTC](https://forum.robotframework.org/t/random-error-on-allocating-element-when-click-element/2726/5 "2021-11-05T13:11:45Z")

</div>

Yes, just go to the source code of SeleniumTestability installed in your machine and remove that browser from the list.

---

<div class="post-metadata">

**Author:** ![jakar](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/jakar/32/1052_2.png) [@jakar](https://forum.robotframework.org/u/jakar)\
**Post date:** [5 November 2021 13:39 UTC](https://forum.robotframework.org/t/random-error-on-allocating-element-when-click-element/2726/6 "2021-11-05T13:39:18Z")

</div>

Thanks.  
I leave only chrome related lines and it start working.

/Users/abc/venvs/project-auto/lib/python3.9/site-packages/SeleniumTestability/plugin.py

```
BROWSERS = {
    "googlechrome": DesiredCapabilities.CHROME,
    "gc": DesiredCapabilities.CHROME,
    "chrome": DesiredCapabilities.CHROME,
    "headlesschrome": DesiredCapabilities.CHROME,
}

```

I steel have an errors with allocating elements

![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/2/283e40be7f5eac06684cfe058b2608a3263721c5.png)

Comparing with run without plugin - there is a WARN in console but tests PASS (except one where element intercepted)  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/8/8ef43e0b08a3606adad03e938863ac5d45bc3a0d.png)

---

<div class="post-metadata">

**Author:** ![jakar](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/jakar/32/1052_2.png) [@jakar](https://forum.robotframework.org/u/jakar)\
**Post date:** [5 November 2021 14:00 UTC](https://forum.robotframework.org/t/random-error-on-allocating-element-when-click-element/2726/7 "2021-11-05T14:00:05Z")

</div>

WARN is because js injections can’t find the browser in some cases?
