Python Forum
Alternatives to Chrome WebDriver? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Alternatives to Chrome WebDriver? (/thread-9671.html)



Alternatives to Chrome WebDriver? - chisox721 - Apr-23-2018

Hi Guys-Right now I'm using Chrome WebDriver to download some files from a URL daily. It usually works, but sometimes the script will open the browser, navigate to the site and even highlight the download icon like its going to download the file, but then it just stalls and I have to click the icon myself. Also, Chrome just seems to run slow. The script is below if anyone wants to take a look.

Has anyone had success using anything other than Chrome to accomplish a task like this? I can continue with what I'm doing and it won't totally mess me up but I'd prefer a method that would cause less headaches. I've included the script if anyone wants to take a look. Thanks in advance for any advice.

driver = webdriver.Chrome()
driver.wait = WebDriverWait(driver, 50)
driver.get(bs_url)
WebDriverWait(driver,20).until(EC.presence_of_element_located((By.ID,"table_all_pid_")))
WebDriverWait(driver,20).until(EC.element_to_be_clickable((By.ID,"table_all_pid_")))
Stats = driver.find_element_by_id("table_all_pid_").click()



RE: Alternatives to Chrome WebDriver? - scidam - Apr-23-2018

You can try a headless browser -- PhantomJS?


RE: Alternatives to Chrome WebDriver? - chisox721 - Apr-23-2018

(Apr-23-2018, 01:20 AM)scidam Wrote: You can try a headless browser -- PhantomJS?

I was going to give that a shot, but I guess it's now deprecated unfortunately.


RE: Alternatives to Chrome WebDriver? - snippsat - Apr-23-2018

(Apr-23-2018, 02:03 AM)chisox721 Wrote: I was going to give that a shot, but I guess it's now deprecated unfortunately.
Both Chrome and FireFox has headless setup for there drivers in Selenium.
That's why PhantomJS(will still work but gives a message) is now deprecated is Selenium.
I have setup for both in Web-scraping part-2.


RE: Alternatives to Chrome WebDriver? - chisox721 - Apr-23-2018

(Apr-23-2018, 02:16 AM)snippsat Wrote:
(Apr-23-2018, 02:03 AM)chisox721 Wrote: I was going to give that a shot, but I guess it's now deprecated unfortunately.
Both Chrome and FireFox has headless setup for there drivers in Selenium.
That's why PhantomJS(will still work but gives a message) is now deprecated is Selenium.
I have setup for both in Web-scraping part-2.

I'll definitely take a look. I was having trouble with chrome options a couple weeks ago and read that it might be necessary to uninstall Chrome and move back to an older version. Is that true?