当前位置: 首页>>代码示例>>PHP>>正文


PHP WebDriverBy::partialLinkText方法代码示例

本文整理汇总了PHP中Facebook\WebDriver\WebDriverBy::partialLinkText方法的典型用法代码示例。如果您正苦于以下问题:PHP WebDriverBy::partialLinkText方法的具体用法?PHP WebDriverBy::partialLinkText怎么用?PHP WebDriverBy::partialLinkText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Facebook\WebDriver\WebDriverBy的用法示例。


在下文中一共展示了WebDriverBy::partialLinkText方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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()));
 }
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:29,代码来源:post_finish_add_phenotype_info_to_CMT_individual.php

示例2: 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

示例3: testCurateSubmittedData

 public function testCurateSubmittedData()
 {
     $element = $this->driver->findElement(WebDriverBy::id("tab_variants"));
     $element->click();
     // Move mouse to Variants tab and click 'view all genomic variants' option.
     $tabElement = $this->driver->findElement(WebDriverBy::id("tab_variants"));
     $this->driver->getMouse()->mouseMove($tabElement->getCoordinates());
     $allVariantsLink = $this->driver->findElement(WebDriverBy::partialLinkText('View all genomic variants'));
     $allVariantsLink->click();
     $this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants$/', $this->driver->getCurrentURL()));
     $element = $this->driver->findElement(WebDriverBy::linkText("0000000001"));
     $element->click();
     $this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants\\/0000000001$/', $this->driver->getCurrentURL()));
     $this->assertEquals("Pending", $this->driver->findElement(WebDriverBy::xpath("//tr[13]/td/span"))->getText());
     $element = $this->driver->findElement(WebDriverBy::id("viewentryOptionsButton_Variants"));
     $element->click();
     $element = $this->driver->findElement(WebDriverBy::linkText("Publish (curate) variant entry"));
     $element->click();
     $this->assertEquals("Public", $this->driver->findElement(WebDriverBy::xpath("//tr[13]/td/span"))->getText());
     $element = $this->driver->findElement(WebDriverBy::linkText("00000001"));
     $element->click();
     $this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/individuals\\/00000001$/', $this->driver->getCurrentURL()));
     $this->assertEquals("Pending", $this->driver->findElement(WebDriverBy::xpath("//tr[8]/td"))->getText());
     $element = $this->driver->findElement(WebDriverBy::id("viewentryOptionsButton_Individuals"));
     $element->click();
     $element = $this->driver->findElement(WebDriverBy::linkText("Publish (curate) individual entry"));
     $element->click();
     $this->assertEquals("Public", $this->driver->findElement(WebDriverBy::xpath("//tr[8]/td"))->getText());
     // Move mouse to Variants tab and click 'view all genomic variants' option.
     $tabElement = $this->driver->findElement(WebDriverBy::id("tab_variants"));
     $this->driver->getMouse()->mouseMove($tabElement->getCoordinates());
     $allVariantsLink = $this->driver->findElement(WebDriverBy::partialLinkText('View all genomic variants'));
     $allVariantsLink->click();
     $this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants$/', $this->driver->getCurrentURL()));
     $element = $this->driver->findElement(WebDriverBy::linkText("0000000002"));
     $element->click();
     $this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants\\/0000000002$/', $this->driver->getCurrentURL()));
     $this->assertEquals("Pending", $this->driver->findElement(WebDriverBy::xpath("//tr[13]/td/span"))->getText());
     $element = $this->driver->findElement(WebDriverBy::id("viewentryOptionsButton_Variants"));
     $element->click();
     $element = $this->driver->findElement(WebDriverBy::linkText("Publish (curate) variant entry"));
     $element->click();
     $this->assertEquals("Public", $this->driver->findElement(WebDriverBy::xpath("//tr[13]/td/span"))->getText());
 }
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:44,代码来源:curate_submitted_data.php

示例4: getDeviceInfo

 public function getDeviceInfo()
 {
     $this->driver->switchTo()->defaultContent();
     //Нажимаем ссылку "домажней страницы" в левом фрейме меню
     $leftMenuFrame = $this->driver->findElement(WebDriverBy::name('leftMenu'));
     $this->driver->switchTo()->frame($leftMenuFrame);
     $this->driver->switchTo()->frame('treeConfig');
     $this->driver->findElement(WebDriverBy::partialLinkText("DGS-1100"))->click();
     //Возвращаемся на верхний уровень страницы (выходим из фреймов)
     $this->driver->switchTo()->defaultContent();
     //Ждем когда страница прогрузится
     sleep(2);
     //Работаем с фреймом mf0
     $this->driver->switchTo()->frame('mf0');
     //Собираем строки из таблицы tabContent
     $vlanTableRows = $this->driver->findElement(WebDriverBy::id('tabContent'))->findElements(WebDriverBy::tagName('tr'));
     $result = [];
     foreach ($vlanTableRows as $vlanTableRow) {
         //Выбираем из строки ячейки
         $tds = [];
         foreach ($vlanTableRow->findElements(WebDriverBy::tagName('td')) as $td) {
             $tds[] = $td->getText();
         }
         //Разбираем данные
         foreach ($tds as $tdIndex => $td) {
             switch ($td) {
                 case 'Serial Number':
                     $result['serialNumber'] = $tds[$tdIndex + 1];
                     break;
                 case 'Firmware Version':
                     $result['firmwareVersion'] = $tds[$tdIndex + 1];
                     break;
                 case 'System Location':
                     $result['systemLocation'] = $tds[$tdIndex + 1];
                     break;
                 case 'System Name':
                     $result['systemName'] = $tds[$tdIndex + 1];
                     break;
             }
         }
     }
     return $result;
 }
开发者ID:avin,项目名称:selenium-parser,代码行数:43,代码来源:ParserDGS_1100_16.php

示例5: testPostFinishAddScreeningToCMTIndividual

 public function testPostFinishAddScreeningToCMTIndividual()
 {
     // Wait for redirect
     $this->waitUntil(WebDriverExpectedCondition::titleContains("View genomic variant"));
     $this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants\\/0000000006$/', $this->driver->getCurrentURL()));
     // Move mouse to Screenings tab and click 'view all screenings' 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 screening to individual"));
     $element->click();
     $this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/screenings[\\s\\S]create&target=00000001$/', $this->driver->getCurrentURL()));
     $option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="Screening/Template[]"]/option[text()="RNA (cDNA)"]'));
     $option->click();
     $option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="Screening/Template[]"]/option[text()="Protein"]'));
     $option->click();
     $option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="Screening/Technique[]"]/option[text()="array for Comparative Genomic Hybridisation"]'));
     $option->click();
     $option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="Screening/Technique[]"]/option[text()="array for resequencing"]'));
     $option->click();
     $option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="Screening/Technique[]"]/option[text()="array for SNP typing"]'));
     $option->click();
     //        $this->addSelection(WebDriverBy::name("genes[]"), "value=GJB1");
     $option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="genes[]"]/option[@value="GJB1"]'));
     $option->click();
     $this->check(WebDriverBy::name("variants_found"));
     $option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin (#00001)"]'));
     $option->click();
     $element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create screening information entry']"));
     $element->click();
     $this->assertEquals("Successfully created the screening entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
 }
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:39,代码来源:post_finish_add_screening_to_CMT_individual.php

示例6: testWebDriverWaits

 public function testWebDriverWaits()
 {
     $fakeWd = Stub::make('\\Codeception\\Module\\WebDriver', ['wait' => Stub::exactly(12, function () {
         return new \Codeception\Util\Maybe();
     })]);
     $this->module->webDriver = $fakeWd;
     $this->module->waitForElement(WebDriverBy::partialLinkText('yeah'));
     $this->module->waitForElement(['id' => 'user']);
     $this->module->waitForElement(['css' => '.user']);
     $this->module->waitForElement('//xpath');
     $this->module->waitForElementVisible(WebDriverBy::partialLinkText('yeah'));
     $this->module->waitForElementVisible(['id' => 'user']);
     $this->module->waitForElementVisible(['css' => '.user']);
     $this->module->waitForElementVisible('//xpath');
     $this->module->waitForElementNotVisible(WebDriverBy::partialLinkText('yeah'));
     $this->module->waitForElementNotVisible(['id' => 'user']);
     $this->module->waitForElementNotVisible(['css' => '.user']);
     $this->module->waitForElementNotVisible('//xpath');
 }
开发者ID:Marfuz,项目名称:c4t_test,代码行数:19,代码来源:WebDriverTest.php

示例7: expectsToBeSelectedByPartialLinkText

 /**
  * Client expects that an element is selected by the given partial link text.
  * Returns true when the element is selected and false otherwise.
  * Retry the process two times or until the attempts argument count
  * is reached when a stale element reference exception is thrown.
  * Recommended usage in web driver waits.
  *
  * @param string $partialLinkText Partial link text of expected element.
  * @param int    $attempts        (Optional) Attempts until the method will fail and return false.
  *
  * @return bool
  */
 public function expectsToBeSelectedByPartialLinkText($partialLinkText, $attempts = 2)
 {
     if ($this->isFailed()) {
         return false;
     }
     $by = WebDriverBy::partialLinkText($partialLinkText);
     return $this->expectsToBeSelected($by, $attempts);
 }
开发者ID:AlcyZ,项目名称:GX-Selenium-Framework,代码行数:20,代码来源:InspectionProviderTrait.php

示例8: getArrayByPartialLinkText

 /**
  * Returns an element by the given partial link text.
  * If nothing is found, an empty array will be returned.
  *
  * @param string $partialLinkText Partial link text of expected element.
  * @param int    $attempts        Attempts until the method will fail and return false.
  *
  * @return WebDriverElement[]|array
  */
 public function getArrayByPartialLinkText($partialLinkText, $attempts = 2)
 {
     if ($this->isFailed()) {
         return [];
     }
     $by = WebDriverBy::partialLinkText($partialLinkText);
     return $this->getArrayBy($by, $attempts);
 }
开发者ID:AlcyZ,项目名称:GX-Selenium-Framework,代码行数:17,代码来源:ElementProviderTrait.php

示例9: find_link

 protected function find_link($text)
 {
     return self::$driver->findElement(WebDriverBy::partialLinkText($text));
 }
开发者ID:mattywebb,项目名称:cyclery-northside,代码行数:4,代码来源:IntegrationTestCase.php

示例10: openFRMenuForCol

 function openFRMenuForCol($nCol)
 {
     // Open the find & replace menu for the specified column index
     // (numbered 1..n from left to right)
     $gearOptionsLink = $this->driver->findElement(WebDriverBy::id('viewlistOptionsButton_VOG'));
     $gearOptionsLink->click();
     $FRMenuItem = $this->driver->findElement(WebDriverBy::partialLinkText('Find and replace text in column'));
     $FRMenuItem->click();
     // Include explicit wait for overlay divs. Going directly to clicking sometimes
     // results in a StaleElementReferenceException.
     $this->waitUntil(function ($driver) use($nCol) {
         $aOverlays = $driver->findElements(WebDriverBy::xpath('//div[@class="vl_overlay"]'));
         return count($aOverlays) >= $nCol;
     });
     $columnOverlay = $this->driver->findElement(WebDriverBy::xpath('//div[@class="vl_overlay"][' . $nCol . ']'));
     $columnOverlay->click();
     // Wait a second to handle click event properly and let tooltip disappear.
     sleep(1);
 }
开发者ID:LOVDnl,项目名称:LOVD3,代码行数:19,代码来源:find_replace.php

示例11: expectSelectVisibleTextByPartialLinkText

 /**
  * Expects to select an elements option by visible text and the elements partial link text.
  * Retry the process two times or until the attempts argument count
  * is reached when a exception is thrown.
  * Returns false when the web driver was unable to select the expected element.
  *
  * @param string $partialLinkText Partial link text of expected element.
  * @param int    $visibleText     VisibleText of option to be selected.
  * @param int    $attempts        Amount of retries until the operation will fail.
  *
  * @return bool True if the elements visible text is selected, false otherwise.
  */
 public function expectSelectVisibleTextByPartialLinkText($partialLinkText, $visibleText, $attempts = 2)
 {
     if ($this->isFailed()) {
         return false;
     }
     $by = WebDriverBy::partialLinkText($partialLinkText);
     return $this->expectSelectVisibleTextByElement($by, $visibleText, $attempts);
 }
开发者ID:AlcyZ,项目名称:GX-Selenium-Framework,代码行数:20,代码来源:SelectingProviderTrait.php

示例12: waitUntilPartialLinkTextIsEnabled

 /**
  * Wait until an element is enabled by the given partial link text or the value of the timeout argument is achieved.
  *
  * @param int $partialLinkText Partial link text of expected element.
  * @param int $timeOut         Timeout to wait, when the amount (in seconds) is reached, the test case fails.
  * @param int $interval        Interval of repeating the waiting condition.
  *
  * @return $this Same instance for chained method calls.
  */
 public function waitUntilPartialLinkTextIsEnabled($partialLinkText, $timeOut = 30, $interval = 250)
 {
     if ($this->isFailed()) {
         return $this;
     }
     $by = WebDriverBy::partialLinkText($partialLinkText);
     return $this->waitUntilElementIsEnabled($by, $timeOut, $interval);
 }
开发者ID:AlcyZ,项目名称:GX-Selenium-Framework,代码行数:17,代码来源:WaitProviderTrait.php

示例13: testPostFinishAddVariantLocatedWithinGeneToCMTIndividual

 public function testPostFinishAddVariantLocatedWithinGeneToCMTIndividual()
 {
     // Wait for redirect
     $this->waitUntil(WebDriverExpectedCondition::titleContains("View genomic variant"));
     $this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants\\/0000000005$/', $this->driver->getCurrentURL()));
     // 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());
     $allScreeningsLink = $this->driver->findElement(WebDriverBy::partialLinkText('View all screenings'));
     $allScreeningsLink->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('//b[contains(., "A variant that is located within a gene")]'));
     $element->click();
     $element = $this->driver->findElement(WebDriverBy::cssSelector("td.ordered"));
     $element->click();
     $this->assertTrue((bool) preg_match('/^[\\s\\S]*\\/src\\/variants[\\s\\S]create&reference=Transcript&geneid=GJB1&target=0000000002$/', $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.251T>A");
     $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.(Val84Asp)", $firstProteinValue);
     $GenomicDNAChange = $this->driver->findElement(WebDriverBy::name('VariantOnGenome/DNA'));
     $this->assertEquals("g.70443808T>A", $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();
     // 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.09");
     $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->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,代码行数:72,代码来源:post_finish_add_variant_located_within_gene_to_CMT_individual.php

示例14: verifyRegexByPartialLinkText

 /**
  * Verify an element with a regular expression by partial link text.
  * Retry the process two times or until the attempts argument count
  * is reached when an exception is thrown.
  *
  * @param string $partialLinkText Partial link text of expected element.
  * @param string $regex           Regular expression to compare with.
  * @param string $type            Verification type (elements text, attributes ...).
  * @param int    $attempts        Attempts until the method will fail and return false.
  *
  * @see VerificationTrait::_validateTypeArgument
  * @return bool
  */
 public function verifyRegexByPartialLinkText($partialLinkText, $regex, $type, $attempts = 2)
 {
     if ($this->isFailed()) {
         return false;
     }
     $by = WebDriverBy::partialLinkText($partialLinkText);
     return $this->_verifyBy($by, $regex, $type, $attempts, true);
 }
开发者ID:AlcyZ,项目名称:GX-Selenium-Framework,代码行数:21,代码来源:VerificationTrait.php

示例15: dontSeeLink

 public function dontSeeLink($text, $url = null)
 {
     $nodes = $this->webDriver->findElements(WebDriverBy::partialLinkText($text));
     if (!$url) {
         if (!empty($nodes)) {
             $this->fail("Link containing text '{$text}' was found in page " . $this->_getCurrentUri());
         }
         return;
     }
     $nodes = array_filter($nodes, function (WebDriverElement $e) use($url) {
         return trim($e->getAttribute('href')) == trim($url);
     });
     if (!empty($nodes)) {
         $this->fail("Link containing text '{$text}' and URL '{$url}' was found in page " . $this->_getCurrentUri());
     }
 }
开发者ID:solutionDrive,项目名称:Codeception,代码行数:16,代码来源:WebDriver.php


注:本文中的Facebook\WebDriver\WebDriverBy::partialLinkText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。