1

OS:- Kali linux 2019.1 Firefox 60.6.1 Geckodriver :- 0.18.0 selenium 3.5.2

The code gets stuck after the browser.get line. When I check the geckodriver logs..it shows > ddons.productaddons WARN Failed downloading via XHR, status: 0, reason: error (Don't Know if it is relevant)

I tried changing the " to ' for the URL, Tried changing browser.get to browser.navigate.to with no success. The URL works fine. I can open it in firefox browser. It also doesn't take a lot of time to open. So, doesn't seem to be a wait() issue.

# ------------[STARTS A WEBSERVER + FORWARDS PORT WITH NGROK]------------- #

os.system('xterm -e "cd ./WEBSERVER/ && php -S 127.0.0.1:80" &')
os.system("./ngrok http 80 > /dev/null &")




time.sleep(3)
display = Display(visible=0, size=(800, 600))
display.start()
browser = webdriver.Firefox(firefox_binary=binary,executable_path='base/geckodriver')
browser.get("http://localhost:4040/status")
time.sleep(5)
url_f=str(browser.find_element_by_css_selector("li.list-unstyled:nth-child(1) > div:nth-child(2) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2)").text)
browser.close()
show_url = str(url_f)


# `GENERATES EMAIL TEMPLATE


emaildata = str(EMAIL1_TW)
emaildata = emaildata.replace('_EF', str(UNAME))
emaildata = emaildata.replace('G_URL', str(n_url))
emaildata = emaildata.replace('Windows 7', str(Email_OS))
emaildata = emaildata.replace('Antartica', str(Email_from))


# `DECIDES THE EMAIL ADDRESS

from_email = str(random.choice(['[email protected]','[email protected]']))



##################################
#      SENDS  EMAIL       #
##################################


subprocess.call(['sendemail', '-f', from_email,'-t', str(Email), '-u', 'Notice for you', '-m', emaildata, '-s', smtps+":"+port, '-o', 'tls=no','-xu', username, '-xp', password])
os.system('reset')
12
  • Update the question with the error stack trace Commented Apr 8, 2019 at 11:27
  • If you navigating to a URL, why are you using get? it should be go(url) instead. Commented Apr 8, 2019 at 11:28
  • This code is within a python code. I don't know how to run a stack trace in this case. Commented Apr 8, 2019 at 12:13
  • Please read stackoverflow.com/help/how-to-ask on how to ask a question. This is missing too much information, the question is somewhat ambiquitious, and the formatting needs revision Commented Apr 8, 2019 at 12:15
  • @AlexanderFalk added the OS version, firefox version, selenium version, geckodriver version...If you are referring to a stack trace..I mentioned ..this is within a python code..I don't know how to run stack in this case. Commented Apr 8, 2019 at 12:18

1 Answer 1

1

The error trace logs would have helped us to debug the issue in a better way. However your main issue is the incompatibility between the version of the binaries which you are using:

  • Firefox v60.6.1
  • Geckodriver v0.18.0
  • Selenium v3.5.2

If you are using GeckoDriver-Selenium-Firefox combo, you need to follow the following compatibility chart:

supported_platforms_geckodriver_24

You can find a detailed discussion in Which Firefox browser versions supported for given Geckodriver version?

Sign up to request clarification or add additional context in comments.

1 Comment

So, Gecko is 0.18.0 which is compatible with selenium 3.5(>3.4) which is compatible with firefox 60.6.1(52-62)...??

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.