python - invalid literal for int() when spliting value with comma -


i looking answers on this, every error did not mean same problem...

driver = webdriver.firefox() driver.get('http://example.com')  def repeat():     import wx     while 1 == 1:         botloc = driver.find_element_by_id('botloc').text         botx,boty = map(int,botloc.split(','))         print botloc         print botx         print boty         wx.yield() def checker():         while 1 == 1:         if driver.current_url == 'http://logged.example.com/':             repeat() checker() 

so after when login myself, div value should automatically printed in shell comming:

valueerror: invalid literal int() base 10: ''

that div split makes crash, typing manually in shell repeat() printing infinite loop correctly time:

>>> repeat() 27,86 27 86 27,85 27 85 ... 

if remove botx,boty = map(int,botloc.split(',')) ok, need split div using comma, because want x , y. how can fix bug simplest way?

edit: website still loading when script trying value , split that.

and here problem, can use controll website, if it's loaded or if it's not?


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -