Approved: Fortect
You may encounter an error code indicating document.getboxobjectfor error. It turns out there are several ways to solve this problem, and that’s what we’ll talk about now.
A
returns boxObject
(x, y, width, height) for a specific element.
Deprecated: This feature is no longer used. While some browsers may still support this site, it may have already been removed from the relevant web standards, perhaps removed, or definitely retained for compatibility reasons only. Avoid using and updating existing provided code; Check out the compatibility table at the bottom of this page to make your own decision. Please be aware that this feature may stop working at any time.
var myDiv means document.getElementById ("myDiv"), BoxObj means document.getBoxObjectFor (myDiv);Anxiety ( + "x:" boxObj.x + ", y:" + boxObj.y + ", + width:" boxObj.width + ", Height:" + boxObj.height);
if (! document.getBoxObjectFor) document.getBoxObjectFor = function (el) and if (! (el instance of HTMLElement)) Get well; //another: var n = el.getBoundingClientRect (), p = el, x Sx = = b.left - el.offsetLeft, y equals sy = b.top - el.offsetTop, w implies window; while (! (p.instanceof HTMLHtmlElement)) sx + = p.scrollLeft;sy + = p.scrollTop;p = p.parentNode; straight bounce back x: sx, sy, y: width: Math.round (b.width), degree of rise: Math.round (b.height),material: el, firstChild: el, lastChild: el, previousSibling: null, nextSibling: null, parentBox: el.parentNode, screenX: x W + .screenX + (w.outerWidth - w.innerWidth) / 2, screenY: p W + .screenY + (w.outerHeight - w.innerHeight) - 2; ;
While this works well, it is not a perfect replacement. Namely, the properties screenX and screenY are approximate at best, which doesn’t pose much of a problem since IG doesn’t seem to be the controls they are using somewhere. Also, it’s nice if the element is not visible, while the original function still dispatches the elements of the element as if it were visible. This shouldn’t be a problem either.
org.openqa.selenium.WebDriverException: unknown error: document.Is getboxobject for non-function (Session records: chrome = 73.0.3683.103) (Driver information: chromedriver = 2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5), platform = Windows NT 6.1.7601 SP1 x86_64) On. (Warning: server cannot provide stack trace information)
wait.until (ExpectedConditions.stalenessOf (item));
public void clickHERE (line throws deal) Throwable driver.findElement (By.xpath (HERE)) click (); driver.findElement (By.xpath (enterDeal)). sendKeys (deal); driver.findElement (By.xpath (searchButtonDCP)) click (); scrollToElement (driver, nextTabDealInfo); Driver .findElement (By.xpath (nextTabDealInfo)). Click ();
Approved: Fortect
Fortect is the world's most popular and effective PC repair tool. It is trusted by millions of people to keep their systems running fast, smooth, and error-free. With its simple user interface and powerful scanning engine, Fortect quickly finds and fixes a broad range of Windows problems - from system instability and security issues to memory management and performance bottlenecks.
driver.findElement (By.xpath (HERE)). click ();
In a larger function, the driver should be able to click and go to the next page.
123k
requested 27 Apr 19 found at 6:11 am
Not The Answer You Are Looking For? Browse Other Questions With The Selenium Google-chrome Webdriver Selenium-chromedriver Java Tag Or Submit Your Own Idea.
org.openqa.selenium.WebDriverException:unwanted error: document. Is getboxobject not a function (Session information: chrome = 73.0.3683.103) (Driver information: chromedriver = 2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5), platform = Windows NT 6.1.7601 SP1 x86_64) (Warning: Internet did not provide any stack trace information)
… implies that the ChromeDriver was unable to communicate, consisting of a web browser i.e. H. Chrome browser session.
Your main native file is the incompatibility model of the binaries you are using, and:
- You are using chromedriver = 2.42
- The relevant chromedriver = 2.42 release notes clearly state the following:
Chrome
supports versions 68-70
- You are using chrome = 73.0
- The ChromeDriver v2.46 release notes clearly state the following:
Supports Chrome v71-73
So there was a clear difference between ChromeDriver v2.42 and Chrome browser v73. ChromeDriver 0
Solution
- Updated to the current version of ChromeDriver 2.46.
- Keep a version of Chrome starting with Chrome v71-73. (as per ChromeDriver v2.46 release notes)
- If your basic web client works too It’s late, uninstall it and install the current and released version of GA Web Client.
- Always call
driver.quit ()
on thetearDown ()
method to properly shutdown and destroy the WebDriver and Web Client instances.
Answered Apr 27 ’19 at 6:53
123k
Speed up your computer's performance now with this simple download.