-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from BlueBrain/feature2
Feature2
- Loading branch information
Showing
14 changed files
with
460 additions
and
323 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright (c) 2024 Blue Brain Project/EPFL | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from selenium.webdriver.common.by import By | ||
|
||
|
||
class ExploreModelPageLocators: | ||
EMODEL_TAB = (By.XPATH, "//li[@title='E-model']") | ||
ME_MODEL_TAB = (By.XPATH, "//li[@title='ME-model']") | ||
CLOSE_BRAIN_REGION_PANEL_BTN = (By.XPATH, "(//button[starts-with(@class, 'ant-btn')]/span[" | ||
"@class='ant-btn-icon'])[1]") | ||
BR_SEARCH_REGION_SEARCH_FIELD = (By.XPATH, "//div[@class='ant-select-selector']") | ||
BR_SEARCH_FIELD_TYPE = (By.XPATH, "//span[@class='ant-select-selection-search']") | ||
BRAIN_REGION_PANEL = (By.XPATH, "(//div[@class='flex h-screen flex-col bg-primary-8'])[1]") | ||
SELECTED_BRAIN_REGION = (By.XPATH, "//h1[@title='Isocortex']/span[text()='Isocortex']") | ||
SEARCH_REGION = (By.XPATH, "//input[@class='ant-select-selection-search-input']") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (c) 2024 Blue Brain Project/EPFL | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
import time | ||
|
||
from selenium.common import ElementNotVisibleException, TimeoutException, \ | ||
StaleElementReferenceException | ||
|
||
from pages.explore_page import ExplorePage | ||
from locators.explore_model_locators import ExploreModelPageLocators | ||
from util.util_links_checker import LinkChecker | ||
from util.util_scraper import UrlScraper | ||
|
||
|
||
class ExploreModelDataPage(ExplorePage, LinkChecker): | ||
def __init__(self, browser, wait, logger): | ||
super().__init__(browser, wait) | ||
self.home_page = ExplorePage(browser, wait) | ||
self.url_scraper = UrlScraper() | ||
self.logger = logger | ||
|
||
def go_to_explore_model_page(self): | ||
self.go_to_page("/explore/interactive/model/e-model") | ||
print("pages/explore/model data: ", self.browser.current_url) | ||
|
||
def find_emodel_tab(self): | ||
return self.find_element(ExploreModelPageLocators.EMODEL_TAB) | ||
|
||
def find_brain_region_search_field(self, timeout=20): | ||
return self.find_element(ExploreModelPageLocators.SEARCH_REGION, timeout=timeout) | ||
|
||
def find_selected_brain_region_title(self): | ||
return self.find_element(ExploreModelPageLocators.SELECTED_BRAIN_REGION) | ||
|
||
def find_brain_region_panel(self): | ||
return self.find_element(ExploreModelPageLocators.BRAIN_REGION_PANEL) | ||
|
||
def brain_region_panel_close_btn(self): | ||
return self.find_element(ExploreModelPageLocators.CLOSE_BRAIN_REGION_PANEL_BTN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.