Python Forum
How to click the button automatically using python
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to click the button automatically using python
#1
Hi Experts,
I have one web page and it has one tab "upload file" . when manually press that button screen pops up and i select excel file and then we I press sumbit it automatically calls oracle function and perform some action.

I want to automate all this using till sumit using python. I have reached the point where I can open the web page and found the xpath of the "upload file" tab,but I am unable to understand how perform all remaining actions.
Also I am unable to upload screenshot so that I can show you all the steps which I follow manually.


Please help in resolving this issue.

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

#Getting local session of Chrome
driver=webdriver.Chrome()

#put here the adress of your page
driver.get("http://mdmdv.gartner.com/mdm/app/marketingBounceBack")
#put here the content you have put in Notepad, ie the XPath
elem = driver.find_elements_by_xpath("//*[@id='emailTab']")
#elem2 = driver.find_elements_by_xpath("//*[@id='emailBounceBacks']/div/div[2]/label")
#("//*[@type='submit']")
#print(elem.get_attribute("class"))
#print(elem.get_attribute("value"))
elem.click()
driver.close()
When I run this web page open ups.
Reply


Messages In This Thread
How to click the button automatically using python - by purnima1 - Nov-29-2017, 02:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  cant click button by script at page michael1834 1 1,104 Dec-08-2023, 04:44 PM
Last Post: SpongeB0B
  Click on a button on web page using Selenium Pavel_47 7 4,762 Jan-05-2023, 04:20 AM
Last Post: ellapurnellrt
  Show HTML in Python application and handle click SamHobbs 2 2,751 Sep-28-2021, 06:27 PM
Last Post: SamHobbs
  button click error rafarangel 2 3,153 Feb-11-2021, 08:19 PM
Last Post: buran
  Log In Button Won't Click - Python Selenium Webdriver samlee916 2 3,862 Jun-07-2020, 04:42 PM
Last Post: samlee916
  How to click facebook message button JanelleGuthrie 2 2,438 May-14-2020, 06:02 PM
Last Post: Larz60+
  Contact form button click action Man_from_India 1 2,828 Feb-01-2020, 06:21 PM
Last Post: snippsat
  HOWTO? Login DSL Modem with Python Requests: need Click "Apply" Button Webtest 4 8,536 Aug-20-2019, 04:03 PM
Last Post: johnmina
  Selenium click on popup button??? GuJu 7 7,999 Jul-20-2019, 09:21 AM
Last Post: Nizam
  How to trigger click event on Button without ID/Name gahhon 7 14,043 Feb-10-2019, 03:06 PM
Last Post: gahhon

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020