Package: easyselenium
easyseleniumLet us handle the boring stuff!Step2success====================Now Automate your browser based projects in easily and faster.easyselenium is write on the top of selenium to make selenium easier for beginers for ready built in funtions only they need to call the functions and pass the arguments.All extra thing time delay and webdriver wait select findping xpath will do in backend.
Get rid of using time delaysBy Ankit KothariApache 2.0 license.Advantage1.Simple easy syntax, Dont need to  remeber the whole selenium syntax and google it.It will call the required code acc to your need.ie: (browser=ie/chrome/firefox)2.Dont need to download drivers for chrmoe/firefox/it it automatically download accc to your version in cache/your desired path.3.All commands are with explicit wait so dont need to use time sleep and slow your code or element not found error. It will wait untill element/page found.4.select your option with partial text5.Manage Window/Javascript alerts also.6.Debug will print line by line what going inside.7.Read element/elements its text and value automatically and print in debug mode and retun in packed list.Documentationwww.step2success.in/easyseleniumhttps://pypi.org/project/easyselenium/examplesfrom easy selenium import *1. open_browser()withoptionalarguments

open_browser(browser='chrome/firefox/ie',headless=True/False,debug=True/False)Bydefault
bydefaulttime:Explicitwaitis50secforeveryfunctionChangefrompassing(timeout=1)## open_browser(headless=False,,browser='chrome',debug=False,path=cache memory to download drivers/or your customised path)2.connect_exisitng_browser(url,session_id)passurlnadseesionidfromyourexistingbrowserwhichisprintedwhenyoucallbrowser.3.open_url(url='https://step2success.in')withoptionalarguments
open_url(url='https://step2success.in',new_tab=False)new_tab=True/False(openinnewtaborsame)4.window_handle(no=1)window_handle(title='google')Toswitchtoyourpopuporanothertabwindow()5.switch_frame (no=1 or name='mainframe')Toswitchtoiframeorframewithnoorname
switch_frame(no=1/name='mainframe'/id='name'/css='btn-danger'/xpath='class=btn-pop'/xpath='//[div[3]/article/div[1]]')6.click_on (text='submit'or image='imagepath' or id='submit' or css='send' or xpath='this')To Click on buton based on iamge/Text or xpathwithoptionalarguments
click_on(no=1/name='mainframe'/id='name'/css='btn-danger'/xpath='class=btn-pop'/xpath='//[div[3]/article/div[1]]')repeat=True/False(True-Todoubleclickonitem)7.mosue_hover (text='submit'or image='imagepath' or id='submit' or css='send' or xpath='this')Tohovermouseonavascriptelementinsteadofclick8.send_text (text='your text' with  id='submit' or css='send' or xpath='this')```sh
with optional arguments
send_text(no=1 / name='mainframe'/id='name'/css='btn-danger'/ xpath='class=btn-pop'/xpath='//[div[3]/article/div[1]]')

with_enter=True/False (True-To enter after type text)9.select_dropdown (option ='option to select' with  id='submit' or css='send' or xpath='this')Toselectoptionindropdownwithpartialtext
select_dropdown(no=1/name='mainframe'/id='name'/css='btn-danger'/xpath='class=btn-pop'/xpath='//[div[3]/article/div[1]]')10.read_text (id='submit' or css='send' or xpath='this')Toreadtextfromelement/multipleelements
Itissamrtenoughtoautomaticallydetectifsingleormultipleelementispresent
Value/Textispresent

Thenreturnyouapackedlistofelemntscontainingtext,valueandsession_id
read_text(no=1/name='mainframe'/id='name'/css='btn-danger'/xpath='class=btn-pop'/xpath='//[div[3]/article/div[1]]')11.close_window (no=1 or name='yahoo')Toswitchandclosetheprovidedwindow
optionalswitch_to=0toswitchtothiswindowafterclosing12.windows_alert (text='NA',with_enter=False)Tosendtextorentertoaccepttowindowsauthentication13.alerts (text='yes'/'no'/'custom'/blank to read it text)Toaccept/decline/sendtext/readtextfromalertbox14.page_source ()ToprintrawHTMLExample :importtimefromeasyseleniumimport*
importtimeopen_browser(path="chromedriver.exe",browser='chrome',debug=True)#open_broswer(browser='firefox')#open_broswer(browser='ie')#open_broswer(browser='chrome',headless=True)open_url(url="https://step2success.in/registration-page-demo/")open_url(url="https://step2success.in/iframe-demo/",new_tab=True)window_handle(no=0)send_text(text='Ankit',id='first_name')send_text(text='Kothari',id='last_name',with_enter=True)select_dropdown(option='What is your Birthdate?',id='dropdown')#click_on(text='REGISTER')#click_on(id='register')time.sleep(3)window_handle(no=1)switch_frame(no=0)read_text(href='#')click_on(text='Follow On Twitter')window_handle(no=2)#close_window(no=2)