querry to get status code in selinium webdriver , unable to find it, requesting to please help me

J

Jaiprakash Singh

hello all,

i am searching how to get status code in selinium (with python), but unable to find it . can anyone help me in this matter

actually my aim is to scroll a page and after each scroll i want to find the status so that on bad status i can exit my code.

here ismy code in python

for i in range(0,60):
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
# i want status code here"
time.sleep(1)
 
N

Nagy László Zsolt

here ismy code in python

for i in range(0,60):
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
# i want status code here"
time.sleep(1)
Status of what? Are you asking the HTTP status of the page downloaded?
That has nothing to do with your javascript code.

AFAIK window.scrollTo has no return value. So what kind of status are
you talking about?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top