How to click the button automatically using python - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: How to click the button automatically using python (/thread-6580.html) |
RE: How to click the button automatically using python - purnima1 - Dec-07-2017 Hi Nilamo, You were right there was some dynamic parts which were getting uploaded later on. I was stuck on this issue from last 5 days. Thank you so much, at-least now I can move forward and do what I actually I want to do. One last thing after adding time it is returning element and when I printing the result it is is giving below mentioned output what is meaning of last line in output
RE: How to click the button automatically using python - nilamo - Dec-07-2017 You printed the element. That's the element. Or, at least, Selenium's representation of the element. RE: How to click the button automatically using python - snippsat - Dec-07-2017 (Dec-07-2017, 04:58 AM)purnima1 Wrote: One last thing after adding time it is returning element and when I printing the result it is is giving below mentioned outputThat element has many methods. Example the html: <input name="EMAIL" size="24" maxlength="75" type="text">Find it bye CSS: email = browser.find_element_by_css_selector('#SubID > input[type="text"]')Test: >>> email <selenium.webdriver.firefox.webelement.FirefoxWebElement (session="845a65d9-e7a7-4c17-9cdf-3086ac17d464", element="{f2f383ec-bc7a-461a-a84e-fab5a4bfcd04}")> >>> email.tag_name 'input' >>> email.send_keys('Foo')So here using 2 method tag_name and send_keys which will send Foo to the input field in browser. A good editor or REPL will show you all method that can be used,or can use dir(email) .
|