Best Python code snippet using pyatom_python
C2270482.py
Source:C2270482.py  
1'''-------------------------------------------------------------------------------------------2Reworked on January 10, 20193@author: Pradheep4Test Case Link  =  http://lnxtestrail.ibi.com/testrail/index.php?/cases/view/22704825Test Case Title =  Components Tab6-----------------------------------------------------------------------------------------------'''7from appstudio import settings8from appstudio.lib.basetestcase import BaseTestCase9from appstudio.tools.common.environments import Tree10from appstudio.tools.common.ribbon import Ribbon11from appstudio.tools import document as Document12import unittest13class C2270482_TestClass(BaseTestCase):14    def test_C2270482(self):15       16        settings.AppStudio.CLOSE_CANVAS = False17        18        """19            STEP 01 : Launch AppStudio, right click on any folder, New->HTML/Document , 20            click Next, click Finish. Hover on "Report"21        """22        Tree.right_click_on_webfocus_environment_item()23        Tree.select_context_menu('New->HTML/Document')24        Document.WizardWindow.select_file_type(Document.WizardWindow.Locators.HtmlDocumentWizard.Buttons.Next)25        Document.WizardWindow.select_file_type(Document.WizardWindow.Locators.HtmlDocumentWizard.Buttons.Finish)26        REPORT_TOOLTIP = 'Report Insert New Report'27        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Reports.Report, REPORT_TOOLTIP, '01.01')28        29        """30            STEP 02 : Hover on "Chart"31            STEP 02 Expected : Tool tip displays: Chart Insert New Chart32        """33        CHART_TOOLTIP = 'Chart Insert New Chart'34        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Reports.Chart, CHART_TOOLTIP, '02.01')35        """36            STEP 03 : Hover on "Image"37            STEP 03 Expected : Tool tip displays: Image Insert Image38        """39        IMAGE_TOOLTIP = 'Image Insert Image'40        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.GenericElements.Image, IMAGE_TOOLTIP, '03.01', image_size=51)41          42        """43            STEP 04 : Hover on "Hyperlink"44            STEP 04 Expected : Tool tip displays: Hyperlink Insert Hyperlink45        """46        HYPERLINK_TOOLTIP = 'Hyperlink Insert Hyperlink'47        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.GenericElements.Hyperlink, HYPERLINK_TOOLTIP, '04.01')48          49        """50            STEP 05 : Hover on "Button"51            STEP 05 Expected : Tool tip displays: Button Insert Push Button52        """53        BUTTON_TOOLTIP = 'Button Insert Push Button'54        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.GenericElements.Button, BUTTON_TOOLTIP, '05.01')55          56        """57            STEP 06 : Hover on "Reset"58            STEP 06 Expected : Tool tip displays: Reset Insert Reset Button59        """60        RESET_TOOLTIP = 'Insert Reset Button'61        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.GenericElements.Reset, RESET_TOOLTIP, '06.01')62          63        """64            STEP 07 : Hover on "Save Selection"65            STEP 07 Expected : Tool tip displays: Save Selection Insert Save Selection Button66        """67        SAVE_SELECTION_TOOLTIP = 'Save Selection Insert Save Selection Button'68        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.GenericElements.SaveSelection, SAVE_SELECTION_TOOLTIP, '07.01')69          70        """71            STEP 08 : Hover on "Label"                     72            STEP 08 Expected : Tool tip displays: Label Insert Label73        """74        LABEL_TOOLTIP = 'Label Insert Label'75        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.GenericElements.Label, LABEL_TOOLTIP, '08.01', image_size=70)76          77        """78            STEP 09 : Hover on "Text"79            STEP 09 Expected : Tool tip displays: Text Insert Text80        """81        TEXT_TOOLTIP = 'Text Insert Text'82        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.GenericElements.Text, TEXT_TOOLTIP, '09.01')83          84        """85            STEP 10 : Hover on 'Line'86            STEP 10 Expected : Tool tip displays: Line Insert Line87        """88        LINE_TOOLTIP = 'Line Insert Line'89        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.GenericElements.Line, LINE_TOOLTIP, '10.01', crop_x1=40)90          91        """92            STEP 11 : Hover on "Menu"93            STEP 11 Expected : Tool tip displays: Horizontal Menu Insert Horizontal Menu94        """95        MENU_TOOLTIP = 'Horizontal Menu Insert Horizontal Menu'96        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.GenericElements.Menu, MENU_TOOLTIP, '11.01')97        98        """99            STEP 12 : Hover on "Table"100            STEP 12 Expected : Tool tip displays: Table Insert Table101        """102        TABLE_TOOLTIP = 'Table     Insert Table'103        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.GenericElements.Table, TABLE_TOOLTIP, '12.01')104        105        """106            STEP 13 : Hover on "Grid"107            STEP 13 Expected : Tool tip displays: Grid Insert Grid108        """109        GRID_TOOLTIP = 'Grid Insert Grid'110        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.GenericElements.Grid, GRID_TOOLTIP, '13.01', image_size=80)111        112        """113            STEP 14 : Hover on "Form"114            STEP 14 Expected : Tool tip displays: Form Insert new Form 115        """116        FORM_TOOLTIP = 'Form Insert new form'117        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Containers.Form, FORM_TOOLTIP, '14.01')118        119        """120            STEP 15 : Hover on "Tab"121            STEP 15 Expected : Tool tip displays: Tab Insert Tab122        """123        TAB_TOOLTIP = 'Tab Insert Tab'124        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Containers.Tab, TAB_TOOLTIP, '15.01')125        126        """127            STEP 16 : Hover on "Accordion"128            STEP 16 Expected : Tool tip displays: Vertical Accordion Insert Vertical Accordion129        """130        ACCORDION_TOOLTIP = 'Vertical Accordion Insert Vertical Accordion'131        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Containers.Accordion, ACCORDION_TOOLTIP, '16.01')132        133        """134            STEP 17 : Hover on "Window"135            STEP 17 Expected : Tool tip displays: Window Insert Window136        """137        WINDOW_TOOLTIP = 'Window Insert Window'138        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Containers.Window, WINDOW_TOOLTIP, '17.01', image_size=51)139        140        """141            STEP 18 : Hover on "Output Widget"142            STEP 18 Expected : Tool tip displays: Output Widget Output Widget 143        """144        OUTPUT_WIDGET_TOOLTIP = 'Output Widget        Output Widget'145        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Containers.OutputWidget, OUTPUT_WIDGET_TOOLTIP, '18.01', image_size=80)146        147        """148            STEP 19 : Hover on "Maintain Data App"149            STEP 19 Expected : Tool tip displays: Maintain Data App Maintain Data App Window150        """151        MAINTAIN_DATA_APP_TOOLTIP = 'Maintain Data App Maintain Data App Window'152        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Containers.MaintainDataApp, MAINTAIN_DATA_APP_TOOLTIP, '19.01')153        154        """155            STEP 20 : Hover on "Group Box"156            STEP 20 Expected : Tool tip displays: Group Box Insert Group Box157        """158        GROUP_BOX_TOOLTIP = 'Group Box Insert Group Box'159        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Containers.GroupBox, GROUP_BOX_TOOLTIP, '20.01', image_size=80)160        161        """162            STEP 21 : Hover on "Panel"163            STEP 21 Expected : Tool tip displays: Panel Insert Panel 164        """165        PANEL_TOOLTIP = 'Panel Insert Panel'166        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Containers.Panel, PANEL_TOOLTIP, '21.01', image_size=80)167        168        """169            STEP 22 : Hover on "Frame"170            STEP 22 Expected : Tool tip displays: Frame Insert Frame171        """172        FRAME_TOOLTIP = 'Frame Insert Frame'173        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Objects.Frame, FRAME_TOOLTIP, '22.01', image_size=51)174        175        """176            STEP 23 : Hover on "Flash"177            STEP 23 Expected : Tool tip displays: Flash Insert Flash Content 178        """179        FLASH_TOOLTIP = 'Flash Insert Flash Content'180        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Objects.Flash, FLASH_TOOLTIP, '23.01')181        182        """183            STEP 24 : Hover on "Map"184            STEP 24 Expected : Tool tip displays: Map Insert Map185        """186        MAP_TOOLTIP = 'Map     Insert Map'187        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Objects.Map, MAP_TOOLTIP, '24.01', image_size=81)188        189        """190            STEP 25 : Hover on "GIS Flex Viewer"191            STEP 25 Expected : Tool tip displays: GIS Flex Viewer...Insert GIS Flex Viewer...192        """193        GIS_FLEX_VIEWER_TOOLTIP = 'GIS Flex Viewer...       Insert GIS Flex Viewer...'194        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Objects.GISFlexViewer, GIS_FLEX_VIEWER_TOOLTIP, '25.01', image_size=51)195        196        """197            STEP 26 : Hover on "</> HTML"198            STEP 26 Expected : Tool tip displays: HTML Insert HTML Object199        """200        HTML_TOOLTIP = 'HTML Insert HTML Object'201        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Objects.HTML, HTML_TOOLTIP, '26.01', crop_x1=40)202    203        """204            STEP 27 : Hover on "ESRI Map"205            STEP 27 Expected : Tool tip displays: ESRI Map Insert ESRI Map206        """207        ESRI_MAP_TOOLTIP = 'ESRI Map Insert ESRI Map'208        Ribbon.verify_tab_item_tooltip_text(Ribbon.Locators.ComponentsTab.Objects.ESRIMap, ESRI_MAP_TOOLTIP, '27.01')209        210if __name__=='__main__' :...startup.py
Source:startup.py  
1# Copyright (c) 2011 Pragma Nolint. 2# See LICENSE.txt for details.3"""The text that appears on the screen while the GUI elements are loading."""4from fly.gui import genericelements5from fly.gui import constants6class StartupCaption(object):7    """Progress caption to tell the user how much of the game has loaded."""8    def __init__(self):9        font_size = 4510        size = (230, 200)11        pos = (constants.SCREEN_WIDTH/2. - size[0]/2., 12               constants.SCREEN_HEIGHT/2. - size[1]/2.)13        text = "Loading"14        self.caption = genericelements.Caption(pos, font_size, size, text)15    def display(self, screen, text):16        """Set the new text, and display on screen.17        @param screen: surface to blit on18        @param text: text to display19        20        @type screen: pygame.Surface21        @type text: str22        """23        self.caption.set_text(text)...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!!
