We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11d5ed1 commit 18a94fdCopy full SHA for 18a94fd
src/selenium-api.js
@@ -3632,8 +3632,8 @@ Selenium.prototype.doShowElement = function(locator){
3632
try{
3633
const highlightElement = document.getElementById("selenium-highlight");
3634
let element = this.browserbot.findElement(locator);
3635
- const elementRects = element.getClientRects()[0];
3636
- const bodyRects = document.body.getClientRects()[0];
+ const elementRects = element.getBoundingClientRect();
+ const bodyRects = document.documentElement.getBoundingClientRect();
3637
highlightElement.style.position = "absolute";
3638
highlightElement.style.zIndex = "100";
3639
highlightElement.style.display = "block";
0 commit comments