Update: Hello Guys i engaged with lot of personal works not have enough time to upload videos.I will upload Amazon automation video in this week or next week
❤️staysafe and stay positive
❤️staysafe and stay positive
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
web=webdriver.Chrome("D:\chromedriver")
web.get("https://www.amazon.com/ap/signin?openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.com%2F%3Fref_%3Dnav_ya_signin&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.assoc_handle=usflex&openid.mode=checkid_setup&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&")
time.sleep(1)
login=web.find_element_by_xpath("/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div[1]/form/div/div/div/div[1]/input[1]")
login.send_keys("Your phone no/email")
Submit=web.find_element_by_xpath("/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div[1]/form/div/div/div/div[2]/span/span/input")
Submit.click()
import time
from selenium.webdriver.common.keys import Keys
web=webdriver.Chrome("D:\chromedriver")
web.get("https://www.amazon.com/ap/signin?openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.com%2F%3Fref_%3Dnav_ya_signin&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.assoc_handle=usflex&openid.mode=checkid_setup&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&")
time.sleep(1)
login=web.find_element_by_xpath("/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div[1]/form/div/div/div/div[1]/input[1]")
login.send_keys("Your phone no/email")
Submit=web.find_element_by_xpath("/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div[1]/form/div/div/div/div[2]/span/span/input")
Submit.click()
from selenium import webdriver
web=webdriver.Chrome("D:\chromedriver")
Producturl="product link"
web.get(Producturl)
Addtocart=web.find_element_by_xpath("/html/body/div[2]/div[1]/div[7]/div[5]/div[1]/div[4]/div/div/div[1]/div/div/div[1]/div/div[2]/div/form/div/div/div[15]/div[1]/span/span/span/input")
Addtocart.click()
web=webdriver.Chrome("D:\chromedriver")
Producturl="product link"
web.get(Producturl)
Addtocart=web.find_element_by_xpath("/html/body/div[2]/div[1]/div[7]/div[5]/div[1]/div[4]/div/div/div[1]/div/div/div[1]/div/div[2]/div/form/div/div/div[15]/div[1]/span/span/span/input")
Addtocart.click()
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
web=webdriver.Chrome("D:\chromedriver")
web.get("https://www.amazon.com")
searchbox=web.find_element_by_id("twotabsearchtextbox")
searchbox.send_keys("macbook pro")
time.sleep(1)
Find=web.find_element_by_xpath("/html/body/div[1]/header/div/div[1]/div[2]/div/form/div[3]/div/span/input")
Find.click()
time.sleep(1)
import time
from selenium.webdriver.common.keys import Keys
web=webdriver.Chrome("D:\chromedriver")
web.get("https://www.amazon.com")
searchbox=web.find_element_by_id("twotabsearchtextbox")
searchbox.send_keys("macbook pro")
time.sleep(1)
Find=web.find_element_by_xpath("/html/body/div[1]/header/div/div[1]/div[2]/div/form/div[3]/div/span/input")
Find.click()
time.sleep(1)
Update: Hello Coders , We have one github repository.And I uploaded some of the projects that I taught in youtube.So check out our github account to grab additional knowledge in python
from selenium import webdriver
import time
browser=webdriver.Chrome("D:\chromedriver.exe")
browser.get("https://www.instagram.com/")
time.sleep(4)
#Login
Username=browser.find_element_by_xpath("/html/body/div[1]/section/main/article/div[2]/div[1]/div/form/div/div[1]/div/label/input")
Username.send_keys("Username")
time.sleep(4)
Password=browser.find_element_by_xpath("/html/body/div[1]/section/main/article/div[2]/div[1]/div/form/div/div[2]/div/label/input")
Password.send_keys("Password")
Password.submit()
time.sleep(5)
#NotNow
Notnow=browser.find_element_by_xpath("/html/body/div[1]/section/main/div/div/div/div/button")
Notnow.click()
time.sleep(3)
#Notification
Noti=browser.find_element_by_xpath("/html/body/div[4]/div/div/div/div[3]/button[2]")
Noti.click()
time.sleep(3)
#Logic
def firstpic():
time.sleep(2)
pic=browser.find_element_by_class_name("_9AhH0")
pic.click()
def likepic():
time.sleep(3)
like=browser.find_element_by_xpath("/html/body/div[1]/section/main/section/div/div[2]/div/article[1]/div[3]/section[1]/span[1]/button")
like.click()
firstpic()
likepic()
import time
browser=webdriver.Chrome("D:\chromedriver.exe")
browser.get("https://www.instagram.com/")
time.sleep(4)
#Login
Username=browser.find_element_by_xpath("/html/body/div[1]/section/main/article/div[2]/div[1]/div/form/div/div[1]/div/label/input")
Username.send_keys("Username")
time.sleep(4)
Password=browser.find_element_by_xpath("/html/body/div[1]/section/main/article/div[2]/div[1]/div/form/div/div[2]/div/label/input")
Password.send_keys("Password")
Password.submit()
time.sleep(5)
#NotNow
Notnow=browser.find_element_by_xpath("/html/body/div[1]/section/main/div/div/div/div/button")
Notnow.click()
time.sleep(3)
#Notification
Noti=browser.find_element_by_xpath("/html/body/div[4]/div/div/div/div[3]/button[2]")
Noti.click()
time.sleep(3)
#Logic
def firstpic():
time.sleep(2)
pic=browser.find_element_by_class_name("_9AhH0")
pic.click()
def likepic():
time.sleep(3)
like=browser.find_element_by_xpath("/html/body/div[1]/section/main/section/div/div[2]/div/article[1]/div[3]/section[1]/span[1]/button")
like.click()
firstpic()
likepic()