Hello,

I've made a simple script that used selenium web driver for python and 
Faker module, which generates Fake Data.

I've tried several times to import the module with hook, hidden element, 
path and every time i run the exe, i am getting the following error

Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File 
"c:\users\mnqko\appdata\local\programs\python\python35-32\lib\site-packages\PyInstaller\loader\pyimod03_importers
.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\faker\__init__.py", line 4, in <module>
  File 
"c:\users\mnqko\appdata\local\programs\python\python35-32\lib\site-packages\PyInstaller\loader\pyimod03_importers
.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\faker\factory.py", line 10, in <module>
  File 
"c:\users\mnqko\appdata\local\programs\python\python35-32\lib\site-packages\PyInstaller\loader\pyimod03_importers
.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\faker\config.py", line 11, in <module>
  File "site-packages\faker\config.py", line 11, in <listcomp>
  File "importlib\__init__.py", line 126, in import_module
ImportError: No module named 'faker.providers'
Autoform returned -1

I am attaching the file with the script.

Thanks in Advance 

Nikola Zagorski

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
from faker import Faker
fake = Faker()
import random



s = input("Enter your Page: ")
driver = webdriver.Chrome("C:/Users/MnQko/Desktop/chromedriver.exe")
driver.maximize_window()

driver.get(s)



elem = driver.find_element_by_id("fullname").send_keys(fake.name())
elem = driver.find_element_by_id("email")
f="testcase_"+fake.password(length=3, special_chars=False, digits=True, upper_case=False, lower_case=True)+"@"+fake.domain_name()
elem.send_keys(f)
elem = driver.find_element_by_id("country").send_keys(fake.country())
elem = driver.find_element_by_name("RegistrationModel.MobilePhone")
elem.send_keys("274621764712")

print ("Registration successful ")
print (f)


Reply via email to