def _check_element_state(self, element, state): """state: True = Enabled, False = Disabled""" if state: SeleniumAssert.element_should_be_enabled(element) else: SeleniumAssert.element_should_be_disabled(element)
def check_custom_geomap_satellite_view_state(self, enabled=True): self.dynamicUseCustomGeomapServerChk.arguments = ["Satellite"] self._select_iframe(self.uniqueIframe, self.dynamicUseCustomGeomapServerChk) SeleniumAssert.element_should_be_enabled( self.dynamicUseCustomGeomapServerChk) if enabled: SeleniumAssert.element_should_be_enabled( self.serverSatelliteViewUrlTemplateTxt) SeleniumAssert.element_should_be_enabled( self.serverSatelliteViewMaxZoomLevelTxt) SeleniumAssert.element_should_be_enabled( self.serverSatelliteViewAttributionLinkUrllink1Txt) SeleniumAssert.element_should_be_enabled( self.serverMapViewAttributionLinkUrllink1Txt) SeleniumAssert.element_should_be_enabled( self.serverSatelliteViewAttributionLinkText2Txt) SeleniumAssert.element_should_be_enabled( self.serverSatelliteViewAttributionLinkUrllink2Txt) SeleniumAssert.element_should_be_enabled( self.serverSatelliteViewAttributionLinkText3Txt) SeleniumAssert.element_should_be_enabled( self.serverSatelliteViewAttributionLinkUrllink3Txt) else: SeleniumAssert.element_should_be_disabled( self.serverSatelliteViewUrlTemplateTxt) SeleniumAssert.element_should_be_disabled( self.serverSatelliteViewMaxZoomLevelTxt) SeleniumAssert.element_should_be_disabled( self.serverSatelliteViewAttributionLinkUrllink1Txt) SeleniumAssert.element_should_be_disabled( self.serverMapViewAttributionLinkUrllink1Txt) SeleniumAssert.element_should_be_disabled( self.serverSatelliteViewAttributionLinkText2Txt) SeleniumAssert.element_should_be_disabled( self.serverSatelliteViewAttributionLinkUrllink2Txt) SeleniumAssert.element_should_be_disabled( self.serverSatelliteViewAttributionLinkText3Txt) SeleniumAssert.element_should_be_disabled( self.serverSatelliteViewAttributionLinkUrllink3Txt) driver.unselect_frame()