Error With Selenium: AttributeError: 'WebDriver' object has no attribute 'Firefox'How to sort a list of objects based on an attribute of the objects?How to know if an object has an attribute in PythonAttributeError: 'module' object has no attributeHow to take screenshot with Selenium WebDriverGet HTML Source of WebElement in Selenium WebDriver using PythonError: “ 'dict' object has no attribute 'iteritems' ”why python selenium does not fill URLNot being able to navigate using webdriver from Selenium for PythonAttributeError: 'module' object has no attribute 'webdriver' seleniumselenium python webscraping

Why would company (decision makers) wait for someone to retire, rather than lay them off, when their role is no longer needed?

How come Arya Stark wasn't hurt by this in Game of Thrones Season 8 Episode 5?

What should I wear to go and sign an employment contract?

Lock out of Oracle based on Windows username

I recently started my machine learning PhD and I have absolutely no idea what I'm doing

Why are there five extra turns in tournament Magic?

What's is the easiest way to purchase a stock and hold it

Why didn't Daenerys' advisers suggest assassinating Cersei?

multicol package causes underfull hbox

French equivalent of the German expression "flöten gehen"

Was Tyrion always a poor strategist?

Appropriate liquid/solvent for life in my underground environment on Venus

How do we explain the use of a software on a math paper?

Can the word crowd refer to just 10 people?

Does a windmilling propeller create more drag than a stopped propeller in an engine out scenario

What technology would Dwarves need to forge titanium?

Combining two Lorentz boosts

Is my company merging branches wrong?

Shortest amud or daf in Shas?

When did Britain learn about the American Declaration of Independence?

Why is the S-duct intake on the Tu-154 uniquely oblong?

Divisor Rich and Poor Numbers

Can an airline pilot be prosecuted for killing an unruly passenger who could not be physically restrained?

Why is choosing a suitable thermodynamic potential important?



Error With Selenium: AttributeError: 'WebDriver' object has no attribute 'Firefox'


How to sort a list of objects based on an attribute of the objects?How to know if an object has an attribute in PythonAttributeError: 'module' object has no attributeHow to take screenshot with Selenium WebDriverGet HTML Source of WebElement in Selenium WebDriver using PythonError: “ 'dict' object has no attribute 'iteritems' ”why python selenium does not fill URLNot being able to navigate using webdriver from Selenium for PythonAttributeError: 'module' object has no attribute 'webdriver' seleniumselenium python webscraping






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I'm trying to run the code below, which I believe should work, but I'm actually getting this error:



AttributeError: 'WebDriver' object has no attribute 'Firefox'



def main():
import csv
import os
import selenium
from selenium import webdriver
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True
wd = webdriver.Firefox(executable_path="C:/Utility/geckodriver.exe", firefox_profile=profile)

ticker = input("Enter your ticker: ")
url = "http://financials.morningstar.com/cash-flow/cf.html?t=" + ticker.upper()
print(url)

browser = wd.Firefox()
browser.get(url)

values_elementticker = browser.find_elements_by_xpath("//span[@class='gry']")
values2 = values = [x.text for x in values_elementticker]
print(values2[0])

values_element = browser.find_elements_by_xpath("//div[@id='data_i97']")
values = [x.text for x in values_element]
print("Cash Flows:")
print(values[0])

with open("C:\Users\Excel\Desktop\results.xls", "a") as f:
for i in range(len(values2)):
f.write(values2[0] + "n")
for i in range(len(values)):
f.write(values[0] + "n")

browser.close()
restart = input("Do you wish to start again?").lower()
if restart == "yes":
main()

else:
exit()
main()


The error is thrown immediately after I enter a valid ticker. Does this work for others? Or, is something wrong with the code? It looks OK to me. Thanks.










share|improve this question

















  • 3





    browser = wd.Firefox() remove this line and just change wd to browser in this line browser = webdriver.Firefox(executable_path="C:/Utility/geckodriver.exe", firefox_profile=profile)

    – supputuri
    Mar 23 at 17:17











  • Yeah, that works for me. Thanks.

    – ryguy72
    Mar 23 at 20:16

















0















I'm trying to run the code below, which I believe should work, but I'm actually getting this error:



AttributeError: 'WebDriver' object has no attribute 'Firefox'



def main():
import csv
import os
import selenium
from selenium import webdriver
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True
wd = webdriver.Firefox(executable_path="C:/Utility/geckodriver.exe", firefox_profile=profile)

ticker = input("Enter your ticker: ")
url = "http://financials.morningstar.com/cash-flow/cf.html?t=" + ticker.upper()
print(url)

browser = wd.Firefox()
browser.get(url)

values_elementticker = browser.find_elements_by_xpath("//span[@class='gry']")
values2 = values = [x.text for x in values_elementticker]
print(values2[0])

values_element = browser.find_elements_by_xpath("//div[@id='data_i97']")
values = [x.text for x in values_element]
print("Cash Flows:")
print(values[0])

with open("C:\Users\Excel\Desktop\results.xls", "a") as f:
for i in range(len(values2)):
f.write(values2[0] + "n")
for i in range(len(values)):
f.write(values[0] + "n")

browser.close()
restart = input("Do you wish to start again?").lower()
if restart == "yes":
main()

else:
exit()
main()


The error is thrown immediately after I enter a valid ticker. Does this work for others? Or, is something wrong with the code? It looks OK to me. Thanks.










share|improve this question

















  • 3





    browser = wd.Firefox() remove this line and just change wd to browser in this line browser = webdriver.Firefox(executable_path="C:/Utility/geckodriver.exe", firefox_profile=profile)

    – supputuri
    Mar 23 at 17:17











  • Yeah, that works for me. Thanks.

    – ryguy72
    Mar 23 at 20:16













0












0








0








I'm trying to run the code below, which I believe should work, but I'm actually getting this error:



AttributeError: 'WebDriver' object has no attribute 'Firefox'



def main():
import csv
import os
import selenium
from selenium import webdriver
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True
wd = webdriver.Firefox(executable_path="C:/Utility/geckodriver.exe", firefox_profile=profile)

ticker = input("Enter your ticker: ")
url = "http://financials.morningstar.com/cash-flow/cf.html?t=" + ticker.upper()
print(url)

browser = wd.Firefox()
browser.get(url)

values_elementticker = browser.find_elements_by_xpath("//span[@class='gry']")
values2 = values = [x.text for x in values_elementticker]
print(values2[0])

values_element = browser.find_elements_by_xpath("//div[@id='data_i97']")
values = [x.text for x in values_element]
print("Cash Flows:")
print(values[0])

with open("C:\Users\Excel\Desktop\results.xls", "a") as f:
for i in range(len(values2)):
f.write(values2[0] + "n")
for i in range(len(values)):
f.write(values[0] + "n")

browser.close()
restart = input("Do you wish to start again?").lower()
if restart == "yes":
main()

else:
exit()
main()


The error is thrown immediately after I enter a valid ticker. Does this work for others? Or, is something wrong with the code? It looks OK to me. Thanks.










share|improve this question














I'm trying to run the code below, which I believe should work, but I'm actually getting this error:



AttributeError: 'WebDriver' object has no attribute 'Firefox'



def main():
import csv
import os
import selenium
from selenium import webdriver
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True
wd = webdriver.Firefox(executable_path="C:/Utility/geckodriver.exe", firefox_profile=profile)

ticker = input("Enter your ticker: ")
url = "http://financials.morningstar.com/cash-flow/cf.html?t=" + ticker.upper()
print(url)

browser = wd.Firefox()
browser.get(url)

values_elementticker = browser.find_elements_by_xpath("//span[@class='gry']")
values2 = values = [x.text for x in values_elementticker]
print(values2[0])

values_element = browser.find_elements_by_xpath("//div[@id='data_i97']")
values = [x.text for x in values_element]
print("Cash Flows:")
print(values[0])

with open("C:\Users\Excel\Desktop\results.xls", "a") as f:
for i in range(len(values2)):
f.write(values2[0] + "n")
for i in range(len(values)):
f.write(values[0] + "n")

browser.close()
restart = input("Do you wish to start again?").lower()
if restart == "yes":
main()

else:
exit()
main()


The error is thrown immediately after I enter a valid ticker. Does this work for others? Or, is something wrong with the code? It looks OK to me. Thanks.







python python-2.7 selenium geckodriver






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 23 at 17:01









ryguy72ryguy72

4,6671826




4,6671826







  • 3





    browser = wd.Firefox() remove this line and just change wd to browser in this line browser = webdriver.Firefox(executable_path="C:/Utility/geckodriver.exe", firefox_profile=profile)

    – supputuri
    Mar 23 at 17:17











  • Yeah, that works for me. Thanks.

    – ryguy72
    Mar 23 at 20:16












  • 3





    browser = wd.Firefox() remove this line and just change wd to browser in this line browser = webdriver.Firefox(executable_path="C:/Utility/geckodriver.exe", firefox_profile=profile)

    – supputuri
    Mar 23 at 17:17











  • Yeah, that works for me. Thanks.

    – ryguy72
    Mar 23 at 20:16







3




3





browser = wd.Firefox() remove this line and just change wd to browser in this line browser = webdriver.Firefox(executable_path="C:/Utility/geckodriver.exe", firefox_profile=profile)

– supputuri
Mar 23 at 17:17





browser = wd.Firefox() remove this line and just change wd to browser in this line browser = webdriver.Firefox(executable_path="C:/Utility/geckodriver.exe", firefox_profile=profile)

– supputuri
Mar 23 at 17:17













Yeah, that works for me. Thanks.

– ryguy72
Mar 23 at 20:16





Yeah, that works for me. Thanks.

– ryguy72
Mar 23 at 20:16












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55316206%2ferror-with-selenium-attributeerror-webdriver-object-has-no-attribute-firefo%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55316206%2ferror-with-selenium-attributeerror-webdriver-object-has-no-attribute-firefo%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현