From a62feefcb6ea5d44ae86564aa78874e2d2ffc644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Tue, 7 Oct 2014 15:29:25 -0700 Subject: [PATCH 1/2] --- instrucciones.md | 5 +++++ troll_mapal.py | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 instrucciones.md create mode 100644 troll_mapal.py diff --git a/instrucciones.md b/instrucciones.md new file mode 100644 index 0000000..2427b2d --- /dev/null +++ b/instrucciones.md @@ -0,0 +1,5 @@ +# Las dependencias son: + +``` +pip install fake-factory selenium +``` \ No newline at end of file diff --git a/troll_mapal.py b/troll_mapal.py new file mode 100644 index 0000000..81490e6 --- /dev/null +++ b/troll_mapal.py @@ -0,0 +1,25 @@ +from selenium import webdriver +from selenium.webdriver.support.ui import Select +from faker import Factory +import random +fake = Factory.create('it_IT') + +dood = "http://doodle.com/arcgntcrzqeqr2c6" +driver = webdriver.Firefox() +driver.implicitly_wait(3) # seconds + +for i in range(0,10): + name = fake.first_name() + driver.get(dood) + nam = driver.find_element_by_xpath('//*[@id="pname"]') + nam.send_keys(name) + print nam + option = random.randint(0,2) + opt = driver.find_element_by_xpath('//*[@id="option{}"]'.format(option)) + opt.click() + sav = driver.find_element_by_xpath('//*[@id="save"]') + sav.click() + import time + time.sleep(2) + +driver.quit() From d8fa88487e04a227aa8b6ec162a6b0522a12af8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Sat, 30 Oct 2021 12:57:20 +0200 Subject: [PATCH 2/2] --- troll_mapal.py => troll_doodle.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename troll_mapal.py => troll_doodle.py (100%) diff --git a/troll_mapal.py b/troll_doodle.py similarity index 100% rename from troll_mapal.py rename to troll_doodle.py