Using Firefox 50 in Selenium Python - python

I am making a program with Selenium Python, which is an automation program.
The problem I have is that I must use Firefox version 50 and when I try to open the browser, it gives me an error and does not open the link.
I had a few questions, the first is that
Is there another package for automation in Python?
Is there a solution so that I can use Firefox version 50 in the program to work?
I want to open Firefox version 50 with Selenium Python

Related

Is there a way to count all open chrome windows with python?

I'm using chrome, and I've been trying to find a way to count open windows with python, I know it can be done with selenium but it only counts the open windows in the webdriver, is there any way to do it in "normal" chrome? What I need is the number of the total opened windows.

selenium library is not showing up in pycharm when writing the first script

I am beginner to the pycharm selenium, i have to create the first project in selenium but when i am writing the script it is not displaying the inbuilt method whereas when i am running the script through python console it is running and opening the browser.
I have installed the selenium package but when i am running first script in selenium it is able to run and giving error also when i am writing the script it is not displaying the inbuilt method
from selenium import webdriver
driver = webdriver.chrome()
driver.get("")
driver.**
can anybody please help ...
When you create project in pycharm check selenium module and its submodules present under ..\Lib\site-packages

Selenium or Chromedriver randomly stopped working with Python

I have a few scripts in Python that use selenium and chromedriver for web scraping. They have worked fine for months but as of last night (04/06/2017) they started giving errors when I try to do anything with chromedriver. For example, these two lines of code produce a not secure error inside the browser address bar.
browser = webdriver.Chrome()
browser.set_window_position(-10000, 0)
My scripts were made using Python 3.5. I installed Python 3.6 but I am still using idle from 3.5. I installed Python 3.6 about 2 weeks ago and didn't have any problems with my scripts working. Why did this randomly start happening, which one of the two is the problem, and how can I fix this?
After downloading the newest version of chromedriver.exe and replacing the old chromedriver my issue was resolved. I still get a not secure error on the browser when it opens but my scripts continue to run now.

Different selenium behaviour on Python

Dear Python community,
I did a small scrip on Python 3 with Selenium to automatize some basic tasks online. It worked fine. It opened the firefox browser, logged in on a web, type text on a search field, etc. Nothing too fancy.
I am still learning and trying different things so in the meantime I installed anaconda, python 2.7, and updated python 3 form 3.4 (I think) to 3.6. I messed something up with all this.
Now my script doesn't work anymore...
First it complaint that the geckodriver was not found. I am sure I didn't installed the first time. Anyway I downloaded it and put it on a Path enviroment varible.
Script then runs but doesn't stop were it did before. It does not wait for the page to load. If I don't want it to fail I have to use the explicit/implicit wait on selenium.
I have problems as well when finding elements on the web using browser.find_element_by_partial_link_text that when I wrote the script worked well.
def download(serial,apoc_user,apoc_pass):
shutil.rmtree(aux.download_path, ignore_errors=True)
profile = webdriver.FirefoxProfile()
profile.set_preference('browser.download.folderList', 2) # custom location
profile.set_preference('browser.download.manager.showWhenStarting', False)
profile.set_preference('browser.download.dir', aux.absolut_path + aux.download_path)
profile.set_preference('browser.helperApps.neverAsk.saveToDisk', aux.all_types_of_files)
browser = webdriver.Firefox(firefox_profile=profile)
browser.get("https://some.web.com")
elem = browser.find_element_by_id('username')
elem.send_keys(user)
passElem = browser.find_element_by_id('password')
passElem.send_keys(password)
browser.find_element_by_id('loginBtn').click()
elem = browser.find_element_by_id('Asset')
elem.send_keys(serial)
elem.submit()
Before twinkering my code, does someone know what is going now?
I currently have python 3.6 and selenium 3.0.0. I tried with python 3.5 and selenium 3.0.2 without success.
I code with Pycharm Community Edition running on windows 7.
Any help will be welcomed!
Thank you all.

Windows: Selenium webdriver.Firefox hangs

I am new to windows and this is the first time I am running a Python program on windows.
I am running a crawler program that uses selenium and firefox webdriver.
My program runs successfully on mac/ubuntu, but on windows
webdriver.Firefox()
open a new geckodriver window(cmd like window) and just hangs there nothing after that. Program doesn't move forward after that.
Windows 7
geckodriverv0.13
Your problem is most likely the compatibility between Firefox and your GeckoDriver. Try using the latest Firefox and geckodriver. If you have a problem with Firefox, try reinstalling it and disable automatic updating.

Categories

Resources