Advertisement
Guest User

Untitled

a guest
Mar 1st, 2016
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. from selenium import webdriver
  2. import time
  3.  
  4.  
  5.  
  6. username = raw_input("Enter a STEAM username: ")
  7. password = raw_input("Enter a STEAM password: ")
  8.  
  9.  
  10. chrome_path = r"C:UsersSkidDesktopchromedriver.exe"
  11. driver = webdriver.Chrome(chrome_path)
  12.  
  13. driver.get("http://www.****.com/index.php")
  14.  
  15. driver.find_element_by_xpath("""//*[@id="navbar"]/ul[2]/a/img""").click()
  16.  
  17. usernameBox = driver.find_element_by_xpath("""//*[@id="steamAccountName"]""")
  18. passwordBox = driver.find_element_by_xpath("""//*[@id="steamPassword"]""")
  19.  
  20. usernameBox.send_keys(username)
  21. passwordBox.send_keys(password)
  22. driver.find_element_by_xpath("""//*[@id="imageLogin"]""").click()
  23.  
  24.  
  25. time.sleep(40)
  26.  
  27. ##Buttons##
  28. ClearButton = driver.find_element_by_xpath("""//*[@id="mainpage"]/div[5]/div[1]/div/button[1]""")
  29. Plus1Button = driver.find_element_by_xpath("""//*[@id="mainpage"]/div[5]/div[1]/div/button[3]""")
  30. Plus10Button = driver.find_element_by_xpath("""//*[@id="mainpage"]/div[5]/div[1]/div/button[4]""")
  31. Plus100Button = driver.find_element_by_xpath("""//*[@id="mainpage"]/div[5]/div[1]/div/button[5]""")
  32. ########
  33.  
  34. Balance = driver.find_element_by_xpath("""//*[@id="balance"]""")
  35.  
  36. RedBetButton = driver.find_element_by_xpath("""//*[@id="panel1-7"]/div[1]/button""")
  37. GrayBetButton = driver.find_element_by_xpath("""//*[@id="panel8-14"]/div[1]/button""")
  38.  
  39. BetEntryBox = driver.find_element_by_xpath("""//*[@id="betAmount"]""")
  40.  
  41.  
  42. Label = driver.find_element_by_xpath("""//*[@id="banner"]""")
  43.  
  44.  
  45. Plus1Button.click()
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. def Bettings():
  54. while True:
  55. if "Rolling in 48.92..." in Label.text:
  56. Current_Balance = driver.find_element_by_xpath("""//*[@id="balance"]""")
  57. print('t')
  58. Updated_Balance = driver.find_element_by_xpath("""//*[@id="balance"]""")
  59. print('z')
  60. if "Rolling in 28.47..." in Label.text:
  61. print("2")
  62. if Current_Balance < Updated_Balance:
  63. print('3')
  64. GrayBetButton.click()
  65. if Current_Balance > Updated_Balance:
  66. print("4")
  67. RedBetButton.click()
  68.  
  69. Bettings()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement