Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.151 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.70; '*S*': 0.00; 'subject:help': 0.07; "skip:' 30": 0.15; 'background,': 0.16; 'selenium': 0.16; 'subject:need': 0.18; 'button,': 0.22; 'this:': 0.23; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'not.': 0.27; 'page.': 0.28; 'clean.': 0.29; "can't": 0.32; 'scanned': 0.32; 'displayed': 0.33; 'loaded': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'expect': 0.37; 'skip:s 40': 0.38; 'whatever': 0.39; 'submit': 0.39; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'called': 0.40; 'charset:windows-1252': 0.62; 'lose': 0.63; 'completed': 0.69; 'dangerous': 0.70; 'clicking': 0.75; 'submit,': 0.84; 'subject:{': 0.91 Subject: {Spam?} Re: need help with selenium To: python-list@python.org References: From: =?UTF-8?Q?Nagy_L=c3=a1szl=c3=b3_Zsolt?= Date: Tue, 15 Sep 2015 14:18:46 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-shopzeus-MailScanner-Information: Please contact the ISP for more information X-shopzeus-MailScanner-ID: BB1E9889B805.A44B9 X-shopzeus-MailScanner: Found to be clean X-shopzeus-MailScanner-SpamCheck: spam, SORBS-DNSBL, SORBS-DUL X-shopzeus-MailScanner-From: gandalf@shopzeus.com X-Spam-Status: Yes X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442320080 news.xs4all.nl 23787 [2001:888:2000:d::a6]:60331 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3468 X-Received-Body-CRC: 210143434 Xref: csiph.com comp.lang.python:96631 > After clicking on submit button, a message is displayed on the same page whether login was successful or not. > However after clicking on submit button, I lose control over the web page. I can't use any selenium functions now like 'driver.find_element_by_name()'. You need to wait until the submit completes. Firefox works in paralel in the background, so don't expect the new page to be loaded right after you called .submit(). One way to do it is this: after calling submit, call this: self.browser.find_element_by_tag_name("body") This call will return ONLY if the page has completed loading. Then you can get page_source or do whatever you want. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.