本文整理汇总了PHP中Facebook\WebDriver\WebDriverBy::linkText方法的典型用法代码示例。如果您正苦于以下问题:PHP WebDriverBy::linkText方法的具体用法?PHP WebDriverBy::linkText怎么用?PHP WebDriverBy::linkText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facebook\WebDriver\WebDriverBy
的用法示例。
在下文中一共展示了WebDriverBy::linkText方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAddSummaryVariantOnlyDescribedOnGenomicLevel
public function testAddSummaryVariantOnlyDescribedOnGenomicLevel()
{
// Wait for redirect
$this->waitUntil(WebDriverExpectedCondition::titleContains("View genomic variant"));
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants\\/0000000003$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::id("tab_submit"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/submit$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr[2]/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*Please reconsider to submit individual data as well, as it makes the data you submit much more valuable![\\s\\S]*$/', $this->getConfirmation()));
$this->chooseOkOnNextConfirmation();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr[2]/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create&reference=Genome$/', $this->driver->getCurrentURL()));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Paternal (confirmed)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="15"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.40702976G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="effect_reported"]/option[text()="Effect unknown"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertTrue((bool) preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\\s\\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
}
示例2: testPostFinishAddPhenotypeInfoToIVAIndividual
public function testPostFinishAddPhenotypeInfoToIVAIndividual()
{
$element = $this->driver->findElement(WebDriverBy::id("tab_individuals"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/individuals\\/IVD$/', $this->driver->getCurrentURL()));
// $element = $this->driver->findElement(WebDriverBy::cssSelector("#00000002 > td.ordered"));
$element = $this->driver->findElement(WebDriverBy::xpath("//td[text()='00000002']"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/individuals\\/00000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::id("viewentryOptionsButton_Individuals"));
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("Add phenotype information to individual"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/phenotypes[\\s\\S]create&target=00000002$/', $this->driver->getCurrentURL()));
$this->enterValue(WebDriverBy::name("Phenotype/Additional"), "Additional phenotype information");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="Phenotype/Inheritance"]/option[text()="Familial"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin (#00001)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="statusid"]/option[text()="Public"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create phenotype information entry']"));
$element->click();
$this->assertTrue((bool) preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\\s\\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
// Wait for page redirect.
$this->waitUntil(WebDriverExpectedCondition::titleContains("View phenotype"));
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/phenotypes\\/0000000003$/', $this->driver->getCurrentURL()));
}
示例3: testAddVariantLocatedWithinGeneToCMTIndividual
public function testAddVariantLocatedWithinGeneToCMTIndividual()
{
// Wait for redirect
$this->waitUntil(WebDriverExpectedCondition::titleContains("Submission of"));
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/submit\\/screening\\/0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create&target=0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath('//b[contains(., "A variant that is located within a gene")]'));
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("GJB1"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create&reference=Transcript&geneid=GJB1&target=0000000001$/', $this->driver->getCurrentURL()));
$this->uncheck(WebDriverBy::name("ignore_00000001"));
$this->enterValue(WebDriverBy::name("00000001_VariantOnTranscript/Exon"), "2");
$this->enterValue(WebDriverBy::name("00000001_VariantOnTranscript/DNA"), "c.34G>T");
$element = $this->driver->findElement(WebDriverBy::cssSelector("button.mapVariant"));
$element->click();
// Wait until RNA description field is filled after AJAX request.
$firstRNAInputSelector = '(//input[contains(@name, "VariantOnTranscript/RNA")])[1]';
$this->waitUntil(function ($driver) use($firstRNAInputSelector) {
$firstRNAInput = $driver->findElement(WebDriverBy::xpath($firstRNAInputSelector));
$firstRNAValue = $firstRNAInput->getAttribute('value');
return !empty($firstRNAValue);
});
// Check RNA description for first transcript.
$firstRNAInput = $this->driver->findElement(WebDriverBy::xpath($firstRNAInputSelector));
$firstRNAValue = $firstRNAInput->getAttribute('value');
$this->assertTrue((bool) preg_match('/^r\\.\\([\\s\\S]\\)$/', $firstRNAValue));
// Check protein description for first transcript.
$firstProteinInputSelector = '(//input[contains(@name, "VariantOnTranscript/Protein")])[1]';
$firstProteinInput = $this->driver->findElement(WebDriverBy::xpath($firstProteinInputSelector));
$firstProteinValue = $firstProteinInput->getAttribute('value');
$this->assertEquals("p.(Gly12Cys)", $firstProteinValue);
$GenomicDNAChange = $this->driver->findElement(WebDriverBy::name('VariantOnGenome/DNA'));
$this->assertEquals("g.70443591G>T", $GenomicDNAChange->getAttribute('value'));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="00000001_effect_reported"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="00000001_effect_concluded"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Maternal (confirmed)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "0.003");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="effect_reported"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="effect_concluded"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin (#00001)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="statusid"]/option[text()="Public"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertEquals("Successfully created the variant entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
示例4: testPostFinishAddPhenotypeInfoToCMTIndividual
public function testPostFinishAddPhenotypeInfoToCMTIndividual()
{
// Wait for redirect
$this->waitUntil(WebDriverExpectedCondition::titleContains("Submission of"));
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/submit\\/screening\\/0000000003$/', $this->driver->getCurrentURL()));
// Move mouse to Individuals tab and click 'view all individuals' option.
$tabElement = $this->driver->findElement(WebDriverBy::id("tab_individuals"));
$this->driver->getMouse()->mouseMove($tabElement->getCoordinates());
$allIndividualsLink = $this->driver->findElement(WebDriverBy::partialLinkText('View all individuals'));
$allIndividualsLink->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/individuals$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::cssSelector("td.ordered"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/individuals\\/00000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::id("viewentryOptionsButton_Individuals"));
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("Add phenotype information to individual"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/phenotypes[\\s\\S]create&target=00000001$/', $this->driver->getCurrentURL()));
$this->enterValue(WebDriverBy::name("Phenotype/Additional"), "Additional phenotype information");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="Phenotype/Inheritance"]/option[text()="Familial"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create phenotype information entry']"));
$element->click();
$this->assertTrue((bool) preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\\s\\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
// Wait for redirect
$this->waitUntil(WebDriverExpectedCondition::titleContains("View phenotype"));
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/phenotypes\\/0000000002$/', $this->driver->getCurrentURL()));
}
示例5: testAddVariantOnlyDescribedOnGenomicLevelToIVAIndividual
public function testAddVariantOnlyDescribedOnGenomicLevelToIVAIndividual()
{
// wait for page redirect
$this->waitUntil(WebDriverExpectedCondition::titleContains("Submission of"));
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/submit\\/screening\\/0000000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create&target=0000000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//table[2]/tbody/tr[2]/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create&reference=Genome&target=0000000002$/', $this->driver->getCurrentURL()));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Paternal (confirmed)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="15"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.40702876G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="effect_reported"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="effect_concluded"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin (#00001)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="statusid"]/option[text()="Public"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertEquals("Successfully created the variant entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:34,代码来源:add_variant_only_described_on_genomic_level_to_IVA_individual.php
示例6: testCreateIndividualDiagnosedWithCMT
public function testCreateIndividualDiagnosedWithCMT()
{
$element = $this->driver->findElement(WebDriverBy::id("tab_submit"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/submit$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/individuals[\\s\\S]create$/', $this->driver->getCurrentURL()));
$this->enterValue(WebDriverBy::name("Individual/Lab_ID"), "12345CMT");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("Individual/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("Individual/Remarks"), "No Remarks");
$this->enterValue(WebDriverBy::name("Individual/Remarks_Non_Public"), "Still no remarks");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="active_diseases[]"]/option[text()="CMT (Charcot Marie Tooth Disease)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin (#00001)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="statusid"]/option[text()="Public"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create individual information entry']"));
$element->click();
$this->assertEquals("Successfully created the individual information entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
示例7: testAddVariantLocatedWithinGeneToHealthyIndividual
public function testAddVariantLocatedWithinGeneToHealthyIndividual()
{
// wait for page redirect
$this->waitUntil(WebDriverExpectedCondition::presenceOfElementLocated(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b")));
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/submit\\/screening\\/0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create&target=0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath('//b[contains(., "A variant that is located within a gene")]'));
// $element = $this->driver->findElement(WebDriverBy::xpath("//table[2]/tbody/tr/td[2]/b"));
$element->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//tr[@id='IVD']/td[2]"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create&reference=Transcript&geneid=IVD&target=0000000001$/', $this->driver->getCurrentURL()));
$this->uncheck(WebDriverBy::name("ignore_00000001"));
$this->enterValue(WebDriverBy::name("00000001_VariantOnTranscript/Exon"), "2");
$this->enterValue(WebDriverBy::name("00000001_VariantOnTranscript/DNA"), "c.456T>G");
$element = $this->driver->findElement(WebDriverBy::cssSelector("button.mapVariant"));
$element->click();
// Wait until RNA description field is filled after AJAX request.
$firstRNAInputSelector = '(//input[contains(@name, "VariantOnTranscript/RNA")])[1]';
$this->waitUntil(function ($driver) use($firstRNAInputSelector) {
$firstRNAInput = $driver->findElement(WebDriverBy::xpath($firstRNAInputSelector));
$firstRNAValue = $firstRNAInput->getAttribute('value');
return !empty($firstRNAValue);
});
// Check RNA description.
$firstRNAInput = $this->driver->findElement(WebDriverBy::xpath($firstRNAInputSelector));
$firstRNAValue = $firstRNAInput->getAttribute('value');
$this->assertTrue((bool) preg_match('/^r\\.\\([\\s\\S]\\)$/', $firstRNAValue));
// Check protein description.
$firstProteinInputSelector = '(//input[contains(@name, "VariantOnTranscript/Protein")])[1]';
$firstProteinInput = $this->driver->findElement(WebDriverBy::xpath($firstProteinInputSelector));
$firstProteinValue = $firstProteinInput->getAttribute('value');
$this->assertRegExp('/^p\\.\\(Tyr152[\\s\\S]*\\)$/', $firstProteinValue);
$GenomicDNAChange = $this->driver->findElement(WebDriverBy::name('VariantOnGenome/DNA'));
$this->assertEquals("g.40702987T>G", $GenomicDNAChange->getAttribute('value'));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="00000001_effect_reported"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="00000001_effect_concluded"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Paternal (confirmed)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "0.05");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="effect_reported"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="effect_concluded"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin (#00001)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="statusid"]/option[text()="Public"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertEquals("Successfully created the variant entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
示例8: testMakeUserCurator
public function testMakeUserCurator()
{
$this->driver->get(ROOT_URL . "/src/genes/IVD?authorize");
$element = $this->driver->findElement(WebDriverBy::linkText("Test Curator"));
$element->click();
$this->enterValue(WebDriverBy::xpath("//td/input[@type='password']"), "test1234");
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Save curator list']"));
$element->click();
$this->assertEquals("Successfully updated the curator list!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
示例9: testCreateGenderColumn
public function testCreateGenderColumn()
{
$this->driver->get(ROOT_URL . "/src/columns/Individual/Gender");
$element = $this->driver->findElement(WebDriverBy::id("viewentryOptionsButton_Columns"));
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("Enable column"));
$element->click();
$this->enterValue(WebDriverBy::name("password"), "test1234");
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Add/enable custom data column Individual/Gender']"));
$element->click();
}
示例10: testPostFinishAddVariantOnlyDescribedOnGenomicLevelToCMT
public function testPostFinishAddVariantOnlyDescribedOnGenomicLevelToCMT()
{
$this->logout();
$this->login('collaborator', 'test1234');
$this->driver->get(ROOT_URL . "/src/");
// Move mouse to Screenings tab and click 'view all screenings' option.
$tabElement = $this->driver->findElement(WebDriverBy::id("tab_screenings"));
$this->driver->getMouse()->mouseMove($tabElement->getCoordinates());
$allVariantsLink = $this->driver->findElement(WebDriverBy::partialLinkText('View all screenings'));
$allVariantsLink->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/screenings$/', $this->driver->getCurrentURL()));
// $element = $this->driver->findElement(WebDriverBy::cssSelector("#0000000002 > td.ordered"));
$element = $this->driver->findElement(WebDriverBy::xpath("//td[text()='0000000002']"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/screenings\\/0000000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::id("viewentryOptionsButton_Screenings"));
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("Add variant to screening"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create&target=0000000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//table[2]/tbody/tr[2]/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create&reference=Genome&target=0000000002$/', $this->driver->getCurrentURL()));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Maternal (confirmed)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="X"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.40702876G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="effect_reported"]/option[text()="Effect unknown"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
for ($second = 0;; $second++) {
if ($second >= 60) {
$this->fail("timeout");
}
try {
if ($this->isElementPresent(WebDriverBy::cssSelector("table[class=info]"))) {
break;
}
} catch (Exception $e) {
}
sleep(1);
}
$this->assertTrue((bool) preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\\s\\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
}
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:52,代码来源:post_finish_add_variant_only_described_on_genomic_level_to_CMT_individual.php
示例11: find
public function find(RemoteWebDriver $webDriver)
{
switch ($this->type) {
case self::ID:
return $webDriver->findElement(WebDriverBy::id($this->value));
case self::CSS_SELECTOR:
return $webDriver->findElement(WebDriverBy::cssSelector($this->value));
case self::LINK_TEXT:
return $webDriver->findElement(WebDriverBy::linkText($this->value));
default:
throw new \LogicException('Invalid element search type: ' . $this->type);
}
}
示例12: testMakeUserCollaboratorGJB
public function testMakeUserCollaboratorGJB()
{
$this->driver->get(ROOT_URL . "/src/genes/GJB1?authorize");
// $this->selectWindow("null");
$element = $this->driver->findElement(WebDriverBy::linkText("Test Collaborator"));
$element->click();
// $this->uncheck("xpath=(//input[@name='allow_edit[]'])[2]");
$this->uncheck(WebDriverBy::xpath("(//input[@name='allow_edit[]'])[2]"));
$this->enterValue(WebDriverBy::xpath("//td/input[@type='password']"), "test1234");
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Save curator list']"));
$element->click();
$this->assertEquals("Successfully updated the curator list!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
示例13: testAddSummaryVariantVCFFile
public function testAddSummaryVariantVCFFile()
{
// Mouse hover over Submit tab, to make 'submit new data' link visible.
$tabElement = $this->driver->findElement(WebDriverBy::xpath("//img[@id='tab_submit']"));
$this->driver->getMouse()->mouseMove($tabElement->getCoordinates());
$element = $this->driver->findElement(WebDriverBy::linkText("Submit new data"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/submit$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr[2]/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*Please reconsider to submit individual data as well, as it makes the data you submit much more valuable![\\s\\S]*$/', $this->getConfirmation()));
$this->chooseOkOnNextConfirmation();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//tr[3]/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants\\/upload[\\s\\S]create$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b"));
$element->click();
$this->driver->get(ROOT_URL . "/src/variants/upload?create&type=VCF");
$this->enterValue(WebDriverBy::name("variant_file"), ROOT_PATH . "../tests/test_data_files/ShortVCFfilev1.vcf");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="hg_build"]/option[text()="hg19"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="dbSNP_column"]/option[text()="VariantOnGenome/Reference"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="genotype_field"]/option[text()="Use Phred-scaled genotype likelihoods (PL)"]'));
$option->click();
$this->check(WebDriverBy::name("allow_mapping"));
$this->check(WebDriverBy::name("allow_create_genes"));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="statusid"]/option[text()="Public"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Upload VCF file']"));
$element->click();
$this->assertEquals("25 variants were imported, 1 variant could not be imported.", $this->driver->findElement(WebDriverBy::id("lovd__progress_message"))->getText());
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Continue »']"));
$element->click();
$this->assertTrue((bool) preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\\s\\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
for ($second = 0;; $second++) {
if ($second >= 600) {
$this->fail("timeout");
}
$this->driver->get(ROOT_URL . "/src/ajax/map_variants.php");
if (strcmp("0 99 There are no variants to map in the database", $this->driver->findElement(WebDriverBy::tagName("body"))->getText())) {
break;
}
$this->assertNotContains("of 25 variants", $this->driver->findElement(WebDriverBy::tagName("body"))->getText());
sleep(1);
}
}
示例14: testAddSummaryVariantSeattleseqFile
public function testAddSummaryVariantSeattleseqFile()
{
// Mouse hover over Submit tab, to make 'submit new data' link visible.
$tabElement = $this->driver->findElement(WebDriverBy::xpath("//img[@id='tab_submit']"));
$this->driver->getMouse()->mouseMove($tabElement->getCoordinates());
$element = $this->driver->findElement(WebDriverBy::linkText("Submit new data"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/submit$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr[2]/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*Please reconsider to submit individual data as well, as it makes the data you submit much more valuable![\\s\\S]*$/', $this->getConfirmation()));
$this->chooseOkOnNextConfirmation();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//tr[3]/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants\\/upload[\\s\\S]create$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr[2]/td[2]/b"));
$element->click();
$this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants\\/upload[\\s\\S]create&type=SeattleSeq$/', $this->driver->getCurrentURL()));
$this->enterValue(WebDriverBy::name("variant_file"), ROOT_PATH . "../tests/test_data_files/ShortSeattleSeqAnnotation138v1.txt");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="hg_build"]/option[text()="hg19"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="dbSNP_column"]/option[text()="VariantOnGenome/Reference"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="autocreate"]/option[text()="Create genes and transcripts"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="statusid"]/option[text()="Public"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Upload SeattleSeq file']"));
$this->clickNoTimeout($element);
for ($second = 0;; $second++) {
if ($second >= 300) {
$this->fail("timeout");
}
try {
if ($this->isElementPresent(WebDriverBy::xpath("//input[@value='Continue »']"))) {
break;
}
} catch (Exception $e) {
}
sleep(1);
}
$this->assertContains("138 variants were imported, 1 variant could not be imported.", $this->driver->findElement(WebDriverBy::id("lovd__progress_message"))->getText());
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Continue »']"));
$element->click();
$this->assertTrue((bool) preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\\s\\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
}
示例15: testAddVariantLocatedWithinGeneToIVAIndividual
public function testAddVariantLocatedWithinGeneToIVAIndividual()
{
$this->driver->get(ROOT_URL . "/src/variants?create&reference=Transcript&geneid=IVD&target=0000000001");
$this->uncheck(WebDriverBy::name("ignore_00000001"));
$this->enterValue(WebDriverBy::name("00000001_VariantOnTranscript/Exon"), "2");
$this->enterValue(WebDriverBy::name("00000001_VariantOnTranscript/DNA"), "c.345G>T");
$element = $this->driver->findElement(WebDriverBy::cssSelector("button.mapVariant"));
$element->click();
// Wait until RNA description field is filled after AJAX request.
$firstRNAInputSelector = '(//input[contains(@name, "VariantOnTranscript/RNA")])[1]';
$this->waitUntil(function ($driver) use($firstRNAInputSelector) {
$firstRNAInput = $driver->findElement(WebDriverBy::xpath($firstRNAInputSelector));
$firstRNAValue = $firstRNAInput->getAttribute('value');
return !empty($firstRNAValue);
});
// Check RNA description for first transcript.
$firstRNAInput = $this->driver->findElement(WebDriverBy::xpath($firstRNAInputSelector));
$firstRNAValue = $firstRNAInput->getAttribute('value');
$this->assertTrue((bool) preg_match('/^r\\.\\([\\s\\S]\\)$/', $firstRNAValue));
// Check protein description for first transcript.
$firstProteinInputSelector = '(//input[contains(@name, "VariantOnTranscript/Protein")])[1]';
$firstProteinInput = $this->driver->findElement(WebDriverBy::xpath($firstProteinInputSelector));
$firstProteinValue = $firstProteinInput->getAttribute('value');
$this->assertEquals("p.(Met115Ile)", $firstProteinValue);
$GenomicDNAChange = $this->driver->findElement(WebDriverBy::name('VariantOnGenome/DNA'));
$this->assertEquals("g.40702876G>T", $GenomicDNAChange->getAttribute('value'));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="00000001_effect_reported"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="00000001_effect_concluded"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Paternal (confirmed)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "0.05");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="effect_reported"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="effect_concluded"]/option[text()="Effect unknown"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="Test Owner (#00006)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="statusid"]/option[text()="Public"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertEquals("Successfully created the variant entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}