splinter

Filling a password form with Splinter

做~自己de王妃 提交于 2019-11-30 16:35:11
I'm trying to fill two forms and login to my banks website. I can get the first form for the username to fill but I can't seem to get the form for the password to fill. Here's the code I'm using: from splinter import Browser username2 = '***' password2 = '***' browser2 = Browser() browser2.visit('http://mijn.ing.nl') browser2.find_by_css('.firstfield').fill(username2) browser2.find_by_id('#easnhbcc').fill(password2) and this is the full traceback: /usr/local/bin/python2 "/Users/narekaramjan/Dropbox/Python/Python 273/Test.py" Traceback (most recent call last): File "/Users/narekaramjan/Dropbox

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings'

让人想犯罪 __ 提交于 2019-11-30 15:14:59
I am trying to make simple python program that is opening list of webpages for a user to manually download reports from the site. I don't have any previous experience with preparing exe files.. And I'm just in learning process for python coding. All of this is done on Windows 7 x64 This is my python code: #!C:/Python34/python.exe -u from splinter import * import time import os import csv #---------------------------------- raporty = [] with open('../raporty.csv', newline='') as csvfile: contents = csv.reader(csvfile, delimiter=' ', quotechar='|') for row in contents: r = ', '.join(row) r = r

accept ssl cert with marionette firefox webdrive python splinter

谁说胖子不能爱 提交于 2019-11-26 18:37:04
问题 when using python splinter firefox 47 marionette new webdriver, it gives certificate error when access the website i want, i tried to accept ssl certs with browser = Browser('firefox', capabilities = {'marionette': True, 'acceptSslCerts': True}) or using trustAllSSLCertificates instead of acceptSslCerts, but still gives me certificate error, what is the problem? 回答1: The Firefox bug is now resolved: https://github.com/mozilla/geckodriver/issues/93 For now, you need to install the latest