Skip to content

Commit

Permalink
Bugfix: Added back the imports and fixed issues caused by saving with…
Browse files Browse the repository at this point in the history
… pycharm
  • Loading branch information
amirldn committed Aug 27, 2020
1 parent 2aba820 commit 4465b33
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions simOrder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import time
from random import randint

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

from func import *


Expand Down Expand Up @@ -101,7 +110,7 @@ def from_terms_to_entry():
# print("Proceed button not found, falling back to submitting JS")
# driver.execute_script("nc_newsim_open_tab2('payment','sid','tid')")

time.sleep(5)
time.sleep(7)

if driver.current_url == "https://www.lycamobile.co.uk/en/success-freesim/":
print("SIM Ordered successfully! Closing in 5 seconds...")
Expand All @@ -113,7 +122,7 @@ def from_terms_to_entry():
if True:
print("The site detected you were a bot, running again!")
# times_ran += 1
time.sleep(5)
time.sleep(2)
for i in range(no_of_sims):
add_sim()
from_terms_to_entry()
Expand All @@ -131,6 +140,7 @@ def from_terms_to_entry():
# Generates name
first_name, last_name, email = person_generate()


# Opens website to order the sim card
driver = webdriver.Chrome()
driver.get("https://www.lycamobile.co.uk/en/order-sim/")
Expand Down

0 comments on commit 4465b33

Please sign in to comment.