public MilkTestEntityDetailSection(ContextConfiguration contextConfiguration, MilkTestEntity milkTestEntity = null) : base(contextConfiguration) { _driver = contextConfiguration.WebDriver; _driverWait = contextConfiguration.WebDriverWait; _isFastText = contextConfiguration.SeleniumSettings.FastText; _contextConfiguration = contextConfiguration; _milkTestEntity = milkTestEntity; InitializeSelectors(); }
public BaseEntity Construct(bool isValid = true) { return(_type switch { "TradingPostListingEntity" => TradingPostListingEntity.GetEntity(isValid, _fixedStrValues), "TradingPostCategoryEntity" => TradingPostCategoryEntity.GetEntity(isValid, _fixedStrValues), "AdminEntity" => AdminEntity.GetEntity(isValid, _fixedStrValues), "FarmEntity" => FarmEntity.GetEntity(isValid, _fixedStrValues), "MilkTestEntity" => MilkTestEntity.GetEntity(isValid, _fixedStrValues), "FarmerEntity" => FarmerEntity.GetEntity(isValid, _fixedStrValues), "ImportantDocumentCategoryEntity" => ImportantDocumentCategoryEntity.GetEntity(isValid, _fixedStrValues), "TechnicalDocumentCategoryEntity" => TechnicalDocumentCategoryEntity.GetEntity(isValid, _fixedStrValues), "QualityDocumentCategoryEntity" => QualityDocumentCategoryEntity.GetEntity(isValid, _fixedStrValues), "QualityDocumentEntity" => QualityDocumentEntity.GetEntity(isValid, _fixedStrValues), "TechnicalDocumentEntity" => TechnicalDocumentEntity.GetEntity(isValid, _fixedStrValues), "ImportantDocumentEntity" => ImportantDocumentEntity.GetEntity(isValid, _fixedStrValues), "NewsArticleEntity" => NewsArticleEntity.GetEntity(isValid, _fixedStrValues), "AgriSupplyDocumentCategoryEntity" => AgriSupplyDocumentCategoryEntity.GetEntity(isValid, _fixedStrValues), "SustainabilityPostEntity" => SustainabilityPostEntity.GetEntity(isValid, _fixedStrValues), "AgriSupplyDocumentEntity" => AgriSupplyDocumentEntity.GetEntity(isValid, _fixedStrValues), "PromotedArticlesEntity" => PromotedArticlesEntity.GetEntity(isValid, _fixedStrValues), _ => throw new Exception($"Cannot find entity type {_type}"), });