Reputation: 89
This is actually for the thread on unknown error: call function result missing 'value' for Selenium Send Keys even after chromedriver upgrade but I guess my reputation isn't high enough to participate(lame).
I got the error:
WebDriverException: Message: unknown error: call function result missing 'value'
(Session info: chrome=65.0.3325.162)
(Driver info: chromedriver=2.33.506106
platform=Mac OS X 10.13.3 x86_64)
when running this line:
driver.execute_script('window.scrollTo(0, %s)' % scroll_to)
I updated and everything else but that error still popped up, however the code actually executed before raising the error, so simply passing the exception allowed me to accomplish my goal, kinda sloppy so it'd be cool if I could make the error go away for real, but this is working for now:
driver.get('https://www.azcentral.com/search/trump/')
page_height = int(driver.get_window_size()['height'])
scroll_to = 0
start_time = time.time()
wait = 90
while True:
scroll_to += page_height
try:
driver.execute_script('window.scrollTo(0, %s)' % scroll_to)
except:
time.sleep(1)
pass
end_time = time.time()
uptime = timedelta(seconds=int(end_time - start_time))
if uptime > timedelta(seconds=wait):
break
Upvotes: 3
Views: 2309
Reputation: 193188
The error says it all :
WebDriverException: Message: unknown error: call function result missing 'value'
(Session info: chrome=65.0.3325.162)
(Driver info: chromedriver=2.33.506106
Your main issue is the version compatibility between the binaries you are using as follows :
Supports Chrome v60-62
Supports Chrome v64-66
So there is a clear mismatch between the ChromeDriver version (v2.33) and the Chrome Browser version (v65.0)
@Test
.Upvotes: 3
Reputation: 6459
I think you can use such code for this:
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
Hope it helps you!
Upvotes: 2