<commit_before>/*
 * Copyright 2008-2013 Microarray Informatics Team, EMBL-European Bioinformatics Institute
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 *
 * For further details of the Gene Expression Atlas project, including source code,
 * downloads and documentation, please see:
 *
 * http://gxa.github.com/gxa
 */

package uk.ac.ebi.atlas.acceptance.selenium.pages;

import com.google.common.collect.Lists;
import org.apache.commons.lang.StringUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.FluentWait;
import org.openqa.selenium.support.ui.Wait;
import org.openqa.selenium.support.ui.WebDriverWait;
import uk.ac.ebi.atlas.acceptance.utils.SeleniumUtil;
import uk.ac.ebi.atlas.model.ExperimentType;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;


public class HeatmapTablePage extends TablePage {

    private static final String PAGE_LOCATION = "/gxa/experiments/";

    @FindBy(id = "arrayDesignAccession")
    private WebElement arrayDesignAccession;

    @FindBy(id = "geneCount")
    private WebElement geneCount;

    @FindBy(id = "display-experiment")
    private WebElement displayExperimentLink;

    @FindBy(id = "display-experiment-design")
    private WebElement displayExperimentDesignLink;

    @FindBy(id = "display-analysis-methods")
    private WebElement displayAnalysisLink;

    @FindBy(id = "download-profiles-link")
    private WebElement downloadExpressionProfilesLink;

    @FindBy(id = "download-raw")
    private WebElement downloadRawCountsLink;

    @FindBy(id = "download-analytics")
    private WebElement downloadAnalyticsLink;

    @FindBy(id = "download-normalized")
    private WebElement downloadNormalizedLink;

    @FindBy(id = "download-expressions")
    private WebElement downloadAllExpressions;

    @FindBy(id = "display-qc-report")
    private WebElement qcReportLink;

    @FindBy(id = "clustering-pdf")
    private WebElement clusteringPdfButton;

    @FindBy(id = "download-logFold")
    private WebElement downloadLogFoldLink;

    @FindBy(className = "gxaGradientLevelMin")
    private WebElement gradientLevelsMin;

    @FindBy(className = "gxaGradientLevelMax")
    private WebElement gradientLevelsMax;

    @FindBy(css = "#heatmap-table > tbody > tr > td > span > a")
    private List<WebElement> geneNames;

    @FindBy(xpath = "//label[@for='queryFactorValues']")
    private WebElement queryFactorLabel;

    @FindBy(id = "anatomogram")
    private WebElement anatomogram;

    @FindBy(css = "#gxaExperimentPageHeatmapCountAndLegend > div > div")
    private WebElement diffHeatmapTableLegend;

    @FindBy(xpath = "id('heatmap-table')/thead/tr[2]/th")
    private WebElement geneColumnHeader;

    @FindBy(xpath = "id('heatmap-table')/thead/tr[2]/th[2]")
    private WebElement designElementHeader;

    @FindBy(id = "ensembl-launcher")
    private WebElement ensemblLauncher;

    @FindBy(id = "anatomogram-ensembl-launcher")
    private WebElement anatomogramEnsemblLauncher;

    @FindBy(id = "ensembl-launcher-box-gramene")
    private WebElement grameneLauncher;

    @FindBy(id = "heatmap-message")
    private WebElement heatmapMessage;

    private String experimentAccession;

    public HeatmapTablePage(WebDriver driver, String experimentAccession) {
        this(driver, experimentAccession, null);
    }

    public HeatmapTablePage(WebDriver driver, String experimentAccession, String httpParameters) {
        super(driver, httpParameters);
        this.experimentAccession = experimentAccession;<commit_msg>Access heatmap legend by class, not by id<commit_after>/*
 * Copyright 2008-2013 Microarray Informatics Team, EMBL-European Bioinformatics Institute
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 *
 * For further details of the Gene Expression Atlas project, including source code,
 * downloads and documentation, please see:
 *
 * http://gxa.github.com/gxa
 */

package uk.ac.ebi.atlas.acceptance.selenium.pages;

import com.google.common.collect.Lists;
import org.apache.commons.lang.StringUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.FluentWait;
import org.openqa.selenium.support.ui.Wait;
import org.openqa.selenium.support.ui.WebDriverWait;
import uk.ac.ebi.atlas.acceptance.utils.SeleniumUtil;
import uk.ac.ebi.atlas.model.ExperimentType;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;


public class HeatmapTablePage extends TablePage {

    private static final String PAGE_LOCATION = "/gxa/experiments/";

    @FindBy(id = "arrayDesignAccession")
    private WebElement arrayDesignAccession;

    @FindBy(id = "geneCount")
    private WebElement geneCount;

    @FindBy(id = "display-experiment")
    private WebElement displayExperimentLink;

    @FindBy(id = "display-experiment-design")
    private WebElement displayExperimentDesignLink;

    @FindBy(id = "display-analysis-methods")
    private WebElement displayAnalysisLink;

    @FindBy(id = "download-profiles-link")
    private WebElement downloadExpressionProfilesLink;

    @FindBy(id = "download-raw")
    private WebElement downloadRawCountsLink;

    @FindBy(id = "download-analytics")
    private WebElement downloadAnalyticsLink;

    @FindBy(id = "download-normalized")
    private WebElement downloadNormalizedLink;

    @FindBy(id = "download-expressions")
    private WebElement downloadAllExpressions;

    @FindBy(id = "display-qc-report")
    private WebElement qcReportLink;

    @FindBy(id = "clustering-pdf")
    private WebElement clusteringPdfButton;

    @FindBy(id = "download-logFold")
    private WebElement downloadLogFoldLink;

    @FindBy(className = "gxaGradientLevelMin")
    private WebElement gradientLevelsMin;

    @FindBy(className = "gxaGradientLevelMax")
    private WebElement gradientLevelsMax;

    @FindBy(css = "#heatmap-table > tbody > tr > td > span > a")
    private List<WebElement> geneNames;

    @FindBy(xpath = "//label[@for='queryFactorValues']")
    private WebElement queryFactorLabel;

    @FindBy(id = "anatomogram")
    private WebElement anatomogram;

    @FindBy(css = ".gxaHeatmapCountAndLegend > div > div")
    private WebElement diffHeatmapTableLegend;

    @FindBy(xpath = "id('heatmap-table')/thead/tr[2]/th")
    private WebElement geneColumnHeader;

    @FindBy(xpath = "id('heatmap-table')/thead/tr[2]/th[2]")
    private WebElement designElementHeader;

    @FindBy(id = "ensembl-launcher")
    private WebElement ensemblLauncher;

    @FindBy(id = "anatomogram-ensembl-launcher")
    private WebElement anatomogramEnsemblLauncher;

    @FindBy(id = "ensembl-launcher-box-gramene")
    private WebElement grameneLauncher;

    @FindBy(id = "heatmap-message")
    private WebElement heatmapMessage;

    private String experimentAccession;

    public HeatmapTablePage(WebDriver driver, String experimentAccession) {
        this(driver, experimentAccession, null);
    }

    public HeatmapTablePage(WebDriver driver, String experimentAccession, String httpParameters) {
        super(driver, httpParameters);
        this.experimentAccession = experimentAccession;
{'fraction_non_alphanumeric': 0.09729791099000908, 'fraction_numerical': 0.0034059945504087193, 'mean_word_length': 4.495321272613849, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3406551', 'n_tokens_mistral': 2723, 'n_tokens_neox': 2561, 'n_words': 622}