python - Passing selenium commands inside a list -


I have a list that contains selenium commands like

  browser = WebDriver Firefox ()  

lis = ['browser.find_element_by_id ("gbqfba"). Click () ',' browser.find_element_by_id ("signup_btn_toppanel"). Try to send () ']

as the command,

  i for lis: driver.i  

Since I have a string here, the dragon is not accepting any solution for it ??

You can use commands to run the wire as dragon commands:

  I LIK: exec 'driver.' + I  

should do the trick.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -