Best Python code snippet using pyatom_python
evolution.py
Source: evolution.py
1#!/usr/bin/python2import string, sys, os3from ldtp import *4from ldtputils import *5from A11yTestUtils import *6program_name = 'evolution'7window_title = 'Evolution Setup Assistant'8a11y_test_init (program_name, '-c mail')9#10# This big block of stuff is for the first-run wizard11# it is commented out so that we may 12#guiexist (window_title)13#14#a11y_scan_window (window_title)15#click (window_title, 'btnForward')16#settextvalue (window_title, 'txtEmailAddress', 'user@localhost')17#settextvalue (window_title, 'txtReply-To', 'user@localhost')18#settextvalue (window_title, 'txtOrganization', 'Organization, Inc.')19#time.sleep (1)20#click (window_title, 'btnForward')21#22#time.sleep (1)23#click (window_title, 'btnForward')24#25#time.sleep (2)26#comboselect (window_title, 'cboServerType1', 'Sendmail')27#time.sleep (2)28#lick (window_title, 'btnForward')29#30#settextvalue (window_title, 'txtName', 'Localhost')31#time.sleep (3)32#click (window_title, 'btnForward')33#time.sleep (2)34#click (window_title, 'btnForward')35#time.sleep (2)36#click (window_title, 'btnApply')37#38#time.sleep (2)39# The Main Mail window40guiexist ('*Evolution-*')41a11y_scan_window ('*Evolution-*')42# Scan the preferences dialog43selectmenuitem ('*Evolution-*', 'mnuEdit;mnuPreferences')44a11y_scan_dialog ('dlgEvolutionPreferences', 'btnClose')45# Scan the Mail Filters dialog46selectmenuitem ('*Evolution-*', 'mnuEdit;mnuMessageFilters')47#click ('dlgMessageFilters', 'btnAdd')48#a11y_scan_dialog ('dlgAddRule', 'btnCancel')49a11y_scan_dialog ('dlgMessageFilters', 'btnCancel')50# Scan the Search Folders dialog51selectmenuitem ('*Evolution-*', 'mnuEdit;mnuSearchFolders')52#click ('dlgMessageFilters', 'btnAdd')53#a11y_scan_dialog ('dlgAddRule', 'btnCancel')54a11y_scan_dialog ('dlgSearchFolders', 'btnCancel')55# Scan the Plugin Manager dialog56selectmenuitem ('*Evolution-*', 'mnuEdit;mnuPlugins')57a11y_scan_dialog ('dlgPluginManager', 'btnOK')58# Scan the custom views dialog59selectmenuitem ('*Evolution-*', 'mnuView;mnuCurrentView;mnuDefineViews')60time.sleep (2)61guiexist ('dlgDefineViewsforMail')62click ('dlgDefineViewsforMail', 'btnNew')63a11y_scan_dialog ('dlgDefineNewView', 'btnCancel')64a11y_scan_dialog ('dlgDefineViewsforMail', 'btnClose')65# Scan the subscribe folders dialog66selectmenuitem ('*Evolution-*', 'mnuFolder;mnuSubscriptions')67a11y_scan_dialog ('dlgFolderSubscriptions', 'btnClose')68# Scan the copy folder dialog69selectmenuitem ('*Evolution-*', 'mnuFolder;mnuCopyFolderTo')70a11y_scan_dialog ('dlgSelectfolder', 'btnCancel')71# Scan the folder properties dialog72selectmenuitem ('*Evolution-*', 'mnuFolder;mnuProperties')73a11y_scan_dialog ('dlgFolderProperties', 'btnOK')74# Scan the mail composer75selectmenuitem ('*Evolution-*', 'mnuMessage;mnuComposeNewMessage')76a11y_scan_window ('frmComposeMessage')77selectmenuitem ('frmComposeMessage', 'mnuFile;mnuClose')78# Switch to the Calendar view79selectmenuitem ('*Evolution-*', 'mnuView;mnuWindow;mnuCalendars')80time.sleep (2)81a11y_scan_window ('*Evolution-Calendars')82# Close the main window83selectmenuitem ('*Evolution-Calendars', 'mnuFile;mnuQuit')...
gimp.py
Source: gimp.py
1#!/usr/bin/python2import string, sys, os3from ldtp import *4from ldtputils import *5from A11yTestUtils import *6program_name = 'gimp'7window_title = 'The GIMP'8a11y_test_init (program_name)9guiexist (window_title)10a11y_scan_window (window_title)11selectmenuitem (window_title, 'mnuFile;mnuNew')12a11y_scan_dialog ('dlgCreateaNewImage', 'btnOK')13# The canvas window apparently is not accessible :(14#a11y_scan_window ('wndUntitled-*')15selectmenuitem (window_title, 'mnuFile;mnuOpenLocation')16a11y_scan_dialog ('dlgOpenLocation', 'btnCancel')17selectmenuitem (window_title, 'mnuFile;mnuAcquire;mnuScreenShot')18a11y_scan_dialog ('dlgScreenShot', 'btnCancel')19#selectmenuitem (window_title, 'mnuFile;mnuPreferences')20#a11y_scan_dialog ('dlgPreferences', 'btnCancel')21selectmenuitem (window_title, 'mnuXtns;mnuModuleManager')22a11y_scan_dialog ('dlgModuleManager', 'btnClose')23selectmenuitem (window_title, 'mnuXtns;mnuPlug-InBrowser')24a11y_scan_dialog ('dlgPlug-InBrowser', 'btnClose')25selectmenuitem (window_title, 'mnuXtns;mnuProcedureBrowser')26a11y_scan_dialog ('dlgProcedureBrowser', 'btnClose')27selectmenuitem (window_title, 'mnuXtns;mnuUnitEditor')28a11y_scan_dialog ('dlgUnitEditor', 'btnClose')29# LDTP BUG: Help and Help are the same, and LDTP uses a hash table...30#selectmenuitem (window_title, 'mnuHelp;mnuHelp')31#a11y_scan_dialog ('wndGIMPHelpBrowser', 'btnClose')32selectmenuitem (window_title, 'mnuHelp;mnuTipoftheDay')33a11y_scan_dialog ('frmGIMPTipoftheDay', 'btnClose')34selectmenuitem (window_title, 'mnuXtns;mnuScript-Fu;mnuButtons;mnuRoundButton')35a11y_scan_dialog ('dlgScript-Fu:RoundButton', 'btnOK')36# LDTP BUG: Need to wait for previous operations to complete37# GIMP can't run multiple script-fu scripts at the same time38#selectmenuitem (window_title, 'mnuXtns;mnuScript-Fu;mnuButtons;mnuSimpleBeveledButton')39#a11y_scan_dialog ('dlgScript-Fu:SimpleBeveledButton', 'btnOK')40# Close GIMP (Should wait for previous operations to complete)41selectmenuitem (window_title, 'mnuFile;mnuQuit')...
gedit.py
Source: gedit.py
1#!/usr/bin/python2import string, sys, os3from ldtp import *4from ldtputils import *5from A11yTestUtils import *6program_name = 'gedit'7window_title = '*-gedit'8a11y_test_init (program_name)9guiexist (window_title)10# Scan the main window11a11y_scan_window (window_title)12# Scan the various dialogs13selectmenuitem (window_title, 'mnuFile;mnuOpen*')14a11y_scan_dialog ('*Location', 'btnCancel')15selectmenuitem (window_title, 'mnuFile;mnuPage*')16a11y_scan_dialog ('*Page*', 'btnClose')17selectmenuitem (window_title, 'mnuEdit;mnuPreferences')18a11y_scan_dialog ('*Preferences*', 'btnClose')19selectmenuitem (window_title, 'mnuSearch;mnuFind')20a11y_scan_dialog ('*Find*', 'btnClose')21time.sleep (1)22selectmenuitem (window_title, 'mnuSearch;mnuReplace')23a11y_scan_dialog ('dlgReplace', 'btnClose')24selectmenuitem (window_title, 'mnuSearch;mnuGo*')25if (objectexist ('*Go*', 'btnClose')):26 a11y_scan_dialog ('*Go*', 'btnClose')27selectmenuitem (window_title, 'mnuTools;mnuCheck*')28if (objectexist ('*Information*', 'btnOK')):29 a11y_scan_dialog ('*Information*', 'btnOK')30selectmenuitem (window_title, 'mnuTools;mnuSet*')31a11y_scan_dialog ('*anguage', 'btnCancel')32selectmenuitem (window_title, 'mnuTools;mnuDocumentStatistics')33a11y_scan_dialog ('*Statistics', 'btnClose')34selectmenuitem (window_title, 'mnuHelp;mnuAbout')35a11y_scan_dialog ('dlgAboutgedit', 'btnClose')36# Close the app37selectmenuitem (window_title, 'mnuFile;mnuQuit')...
Check out the latest blogs from LambdaTest on this topic:
Pair testing can help you complete your testing tasks faster and with higher quality. But who can do pair testing, and when should it be done? And what form of pair testing is best for your circumstance? Check out this blog for more information on how to conduct pair testing to optimize its benefits.
We launched LT Browser in 2020, and we were overwhelmed by the response as it was awarded as the #5 product of the day on the ProductHunt platform. Today, after 74,585 downloads and 7,000 total test runs with an average of 100 test runs each day, the LT Browser has continued to help developers build responsive web designs in a jiffy.
To understand the agile testing mindset, we first need to determine what makes a team “agile.” To me, an agile team continually focuses on becoming self-organized and cross-functional to be able to complete any challenge they may face during a project.
The QA testing career includes following an often long, winding road filled with fun, chaos, challenges, and complexity. Financially, the spectrum is broad and influenced by location, company type, company size, and the QA tester’s experience level. QA testing is a profitable, enjoyable, and thriving career choice.
Dries Buytaert, a graduate student at the University of Antwerp, came up with the idea of developing something similar to a chat room. Moreover, he modified the conventional chat rooms into a website where his friends could post their queries and reply through comments. However, for this project, he thought of creating a temporary archive of posts.
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!