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


PHP WebDriverBy::linktext方法代码示例

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


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

示例1: testCalendarEntryCreateTest

 public function testCalendarEntryCreateTest()
 {
     // create Booking
     self::$helper->searchForRoomByAll("I117", "", date('d') + 1, date('m'), date('Y'), "10", "00", "12", "00", array());
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking("CalendarTestBooking", date('d') + 1, date('m'), date('Y'), "10", "00", date('d') + 1, date('m'), date('Y'), "12", "00", "true");
     // check calendar entry
     self::$webDriver->findElement(WebDriverBy::linkText(self::$helper->getCurrentMonth() . ' ' . date('Y')))->click();
     $this->assertContains("10:00 CalendarTestBooking", self::$webDriver->findElement(webDriverBy::cssSelector("div.ilTabContentOuter.ilTabsTableCell"))->getText());
     // go back to bookings
     self::$webDriver->findElement(WebDriverBy::linkText('Termine'))->click();
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:12,代码来源:ilRoomSharingAcceptanceCalendarTest.php

示例2: createTestData

 public static function createTestData()
 {
     self::$webDriver->findElement(WebDriverBy::partialLinkText('Rechte'))->click();
     self::$webDriver->findElement(WebDriverBy::id('select_4_nocreation'))->click();
     self::$webDriver->findElement(WebDriverBy::name('cmd[savePermissions]'))->click();
     self::$helper->createNewUser(self::$new_user_login, self::$new_user_initial_pw, self::$new_user_gender, self::$new_user_first_name, self::$new_user_last_name, self::$new_user_email);
     self::$helper->createNewUser(self::$lazy_user_login, self::$lazy_user_pw, self::$lazy_user_gender, self::$lazy_user_first_name, self::$lazy_user_last_name, self::$lazy_user_email);
     self::$helper->toRSS();
     self::$helper->addAttributeForBooking(self::$attribute_name);
     self::setUpPrivilegeClass();
     //Grant the privileges necessary to book
     self::$helper->createRoom(self::$standard_roomname, '1', '10');
     self::$helper->createRoom(self::$differing_roomname, '1', '10');
     self::$helper->createRoom(self::$unbooked_roomname, '1', '10');
     self::$helper->searchForRoomByName(self::$standard_roomname);
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking(self::$standard_subject, "1", "1", date("Y") + 1, "12", "00", "1", "1", date("Y") + 1, "13", "00", "", self::$standard_comment, false, array(), array(self::$attribute_name => self::$standard_attribute));
     self::$helper->searchForRoomByName(self::$differing_roomname);
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking(self::$standard_subject, "1", "1", date("Y") + 1, "14", "00", "1", "1", date("Y") + 1, "15", "00", "", self::$standard_comment, false, array(), array(self::$attribute_name => self::$standard_attribute));
     self::$helper->searchForRoomByName(self::$standard_roomname);
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking(self::$differing_subject, "1", "1", date("Y") + 1, "16", "00", "1", "1", date("Y") + 1, "17", "00", "", self::$standard_comment, false, array(), array(self::$attribute_name => self::$standard_attribute));
     self::$helper->searchForRoomByName(self::$standard_roomname);
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking(self::$standard_subject, "1", "1", date("Y") + 1, "18", "00", "1", "1", date("Y") + 1, "19", "00", "", self::$differing_comment, false, array(), array(self::$attribute_name => self::$standard_attribute));
     self::$helper->searchForRoomByName(self::$standard_roomname);
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking(self::$standard_subject, "1", "1", date("Y") + 1, "20", "00", "1", "1", date("Y") + 1, "21", "00", "", self::$standard_comment, false, array(), array(self::$attribute_name => self::$differing_attribute));
     self::$helper->logout();
     //new user will be asked to change his password at first login
     self::$helper->loginNewUserForFirstTime(self::$new_user_login, self::$new_user_initial_pw, self::$new_user_pw);
     self::$helper->toRSS();
     self::$helper->searchForRoomByName(self::$standard_roomname);
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking(self::$standard_subject, "1", "1", date("Y") + 1, "8", "00", "1", "1", date("Y") + 1, "9", "00", "", self::$standard_comment, false, array(), array(self::$attribute_name => self::$standard_attribute));
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:37,代码来源:ilRoomSharingAcceptanceBookingFilterTest.php

示例3: testEditInvalidDate

 public function testEditInvalidDate()
 {
     //edit date, date in past
     $row = self::$webDriver->findElement(WebDriverBy::xpath("//tr[contains(text(), " . "TestEditBooking" . ")]/td[8]"));
     $row->findElement(WebDriverBy::linkText('Bearbeiten'))->click();
     self::$webDriver->findElement(WebDriverBy::id('from[date]_d'))->sendKeys("13");
     self::$webDriver->findElement(WebDriverBy::id('from[date]_m'))->sendKeys("12");
     self::$webDriver->findElement(WebDriverBy::id('from[date]_y'))->sendKeys("2013");
     self::$webDriver->findElement(WebDriverBy::id('from[time]_h'))->sendKeys("11");
     self::$webDriver->findElement(WebDriverBy::id('from[time]_m'))->sendKeys("00");
     self::$webDriver->findElement(WebDriverBy::id('to[date]_d'))->sendKeys("13");
     self::$webDriver->findElement(WebDriverBy::id('to[date]_m'))->sendKeys("12");
     self::$webDriver->findElement(WebDriverBy::id('to[date]_y'))->sendKeys("2013");
     self::$webDriver->findElement(WebDriverBy::id('to[time]_h'))->sendKeys("13");
     self::$webDriver->findElement(WebDriverBy::id('to[time]_m'))->sendKeys("13");
     self::$webDriver->findElement(WebDriverBy::name('cmd[saveEditBooking]'))->click();
     $this->assertContains("Vergangenheit", self::$helper->getErrMessage());
     self::$webDriver->findElement(WebDriverBy::linkText('Zurück zu den Buchungen'))->click();
     //edit date, room occupied
     //book second room for occupation
     self::$helper->searchForRoomByAll("I117", "", "12", "12", "2018", "10", "00", "12", "00", array());
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking("BlockingBooking", "12", "12", "2018", "10", "00", "12", "12", "2018", "12", "00", "true");
     //edit the date
     $row2 = self::$webDriver->findElement(WebDriverBy::xpath("//tr[contains(text(), " . "TestEditBooking" . ")]/td[8]"));
     $row2->findElement(WebDriverBy::linkText('Bearbeiten'))->click();
     self::$webDriver->findElement(WebDriverBy::id('from[date]_d'))->sendKeys("12");
     self::$webDriver->findElement(WebDriverBy::id('from[date]_m'))->sendKeys("01");
     self::$webDriver->findElement(WebDriverBy::id('from[date]_y'))->sendKeys("2018");
     self::$webDriver->findElement(WebDriverBy::id('from[time]_h'))->sendKeys("10");
     self::$webDriver->findElement(WebDriverBy::id('from[time]_m'))->sendKeys("00");
     self::$webDriver->findElement(WebDriverBy::id('to[date]_d'))->sendKeys("12");
     self::$webDriver->findElement(WebDriverBy::id('to[date]_m'))->sendKeys("01");
     self::$webDriver->findElement(WebDriverBy::id('to[date]_y'))->sendKeys("2018");
     self::$webDriver->findElement(WebDriverBy::id('to[time]_h'))->sendKeys("12");
     self::$webDriver->findElement(WebDriverBy::id('to[time]_m'))->sendKeys("12");
     self::$webDriver->findElement(WebDriverBy::name('cmd[saveEditBooking]'))->click();
     $this->assertContains("Der Raum ist in dem Zeitraum bereits gebucht", self::$helper->getErrMessage());
     self::$webDriver->findElement(WebDriverBy::linkText('Zurück zu den Buchungen'))->click();
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:40,代码来源:ilRoomSharingAcceptanceBookingEditTest.php

示例4: testValidBookingWithParticipants

 /**
  * Test valid booking: participants
  * @test
  */
 public function testValidBookingWithParticipants()
 {
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->fillBookingForm("Testbuchung", "12", "2", "2016", "10", "00", "12", "2", "2016", "11", "00", true, "", true, array("aaa", "bbb"));
     self::$webDriver->findElement(WebDriverBy::name('cmd[book]'))->click();
     $this->assertEquals("Buchung hinzugefügt", self::$helper->getSuccMessage());
     $page = self::$webDriver->findElement(WebDriverBy::tagName('body'))->getText();
     $this->assertContains("Alfred", $page);
     $this->assertContains("Bernd", $page);
     self::$helper->deleteFirstBooking();
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:15,代码来源:ilRoomSharingAcceptanceBookingsTest.php

示例5: testAppointmentPrivileges

 public function testAppointmentPrivileges()
 {
     #1 check without any privilege
     self::$helper->logout();
     self::$helper->login(self::$new_user_1_login, self::$new_user_1_pw);
     self::$helper->toRSS();
     try {
         $webDriver->findElement(webDriverBy::linkText('Termine'));
         $this->fail("#1 Appointments are displayed even if there's no privilege");
     } catch (Exception $ex) {
         //Nothing to do here - the Element musn't be found!
     }
     #2 check with the privilege to see appointments and administrate booking attributes
     self::$helper->logout();
     self::$helper->login(self::$login_root, self::$pass_root);
     self::$helper->toRSS();
     self::$webDriver->findElement(webDriverBy::linkText('Privilegien'))->click();
     $class_1_id = self::$helper->getPrivilegeClassIDByNamePartial(self::$classname_1);
     self::$helper->grantPrivilege('accessAppointments', $class_1_id);
     self::$helper->grantPrivilege('adminBookingAttributes', $class_1_id);
     self::$helper->logout();
     self::$helper->login(self::$new_user_1_login, self::$new_user_1_pw);
     self::$helper->toRSS();
     $this->assertEquals(true, self::$webDriver->findElement(webDriverBy::linkText('Termine'))->isDisplayed(), '#2 - 1 Appointments are not displayed even the privilege is granted');
     $this->assertEquals(true, self::$webDriver->findElement(webDriverBy::linkText('Termine'))->isDisplayed(), '#2 - 2 Attributes are not displayed even the privilege is granted');
     # Check if non_public bookings are not displayed
     self::$helper->logout();
     self::$helper->login(self::$login_root, self::$pass_root);
     self::$helper->toRSS();
     //Create a non-public booking
     self::$helper->createRoom(self::$standard_roomname, '1', '10');
     self::$helper->searchForRoomByName(self::$standard_roomname);
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking(self::$standard_subject, "1", "1", date("Y") + 1, "12", "00", "1", "1", date("Y") + 1, "13", "00", '');
     self::$helper->logout();
     self::$helper->login(self::$new_user_1_login, self::$new_user_1_pw);
     self::$helper->toRSS();
     $this->assertEquals(0, self::$helper->getNoOfResults(), "#3 A non-public booking is visible to an user without the privilege");
     #4 Check the privilege to see non-public bookings
     self::$helper->logout();
     self::$helper->login(self::$login_root, self::$pass_root);
     self::$helper->toRSS();
     self::$webDriver->findElement(webDriverBy::linkText('Privilegien'))->click();
     self::$helper->grantPrivilege('seeNonPublicBookingInformation', $class_1_id);
     self::$helper->logout();
     self::$helper->login(self::$new_user_1_login, self::$new_user_1_pw);
     self::$helper->toRSS();
     $this->assertEquals(1, self::$helper->getNoOfResults(), "#4 A non-public booking is not visible to an user with the privilege");
     #5 Check if the search is accessible
     self::$helper->logout();
     self::$helper->login(self::$login_root, self::$pass_root);
     self::$helper->toRSS();
     self::$webDriver->findElement(webDriverBy::linkText('Privilegien'))->click();
     self::$helper->grantPrivilege('accessSearch', $class_1_id);
     self::$helper->logout();
     self::$helper->login(self::$new_user_1_login, self::$new_user_1_pw);
     self::$helper->toRSS();
     $this->assertEquals(true, self::$webDriver->findElement(webDriverBy::linkText('Suche'))->isDisplayed(), '#5 Search is not displayed even the privilege is granted');
     #6 Check if the "add booking"-link is not showed, if the privilege isn't given
     try {
         $webDriver->findElement(webDriverBy::partialLinkText('Buchung hinzufügen'))->click();
         $this->fail('#6 Add Booking is acceptible without the privilege');
     } catch (Exception $ex) {
         //Nothing to do - the exception should come
     }
     #7 Check if the "add booking"-link is showed if the privilege is given
     self::$helper->logout();
     self::$helper->login(self::$login_root, self::$pass_root);
     self::$helper->toRSS();
     self::$webDriver->findElement(webDriverBy::linkText('Privilegien'))->click();
     self::$helper->grantPrivilege('addOwnBookings', $class_1_id);
     self::$helper->logout();
     self::$helper->login(self::$new_user_1_login, self::$new_user_1_pw);
     self::$helper->toRSS();
     $this->assertEquals(true, self::$webDriver->findElement(webDriverBy::partialLinkText('Buchung hinzufügen'))->isDisplayed(), '#7 Add Booking is not displayed even the privilege is granted');
     #8 Check if a user with a higher Priority can oust another booking
     self::$helper->searchForRoomByName(self::$standard_roomname);
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking(self::$standard_subject, "1", "1", date("Y") + 1, "15", "00", "1", "1", date("Y") + 1, "16", "00", '');
     self::$helper->searchForRoomByName(self::$standard_roomname);
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking(self::$standard_subject, "1", "1", date("Y") + 1, "17", "00", "1", "1", date("Y") + 1, "18", "00", '');
     self::$helper->logout();
     self::$helper->login(self::$login_root, self::$pass_root);
     self::$helper->toRSS();
     self::$webDriver->findElement(webDriverBy::linkText('Privilegien'))->click();
     $class_2_id = self::$helper->getPrivilegeClassIDByNamePartial(self::$classname_2);
     self::$helper->grantPrivilege('cancelBookingLowerPriority', $class_2_id);
     self::$helper->grantPrivilege('accessSearch', $class_2_id);
     self::$helper->grantPrivilege('seeNonPublicBookingInformation', $class_2_id);
     self::$helper->grantPrivilege('accessAppointments', $class_2_id);
     self::$helper->grantPrivilege('addOwnBookings', $class_2_id);
     self::$helper->logout();
     self::$helper->login(self::$new_user_2_login, self::$new_user_2_pw);
     self::$helper->toRSS();
     self::$helper->searchForRoomByName(self::$standard_roomname);
     self::$webDriver->findElement(WebDriverBy::linktext('Buchen'))->click();
     self::$helper->doABooking(self::$standard_subject, "1", "1", date("Y") + 1, "15", "00", "1", "1", date("Y") + 1, "16", "00", '');
     try {
         self::$webDriver->findElement(WebDriverBy::className("ilFailureMessage"));
//.........这里部分代码省略.........
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:101,代码来源:ilRoomSharingAcceptancePrivilegeTest.php


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