當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript built.browser類代碼示例

本文整理匯總了TypeScript中protractor/built.browser的典型用法代碼示例。如果您正苦於以下問題:TypeScript browser類的具體用法?TypeScript browser怎麽用?TypeScript browser使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了browser類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: it

 it('should discard the invitation after joining once', () => {
     createParty(browser3.instance);
     joinParty(browser3.instance, browser, TEST_CHAR_NAME3, TEST_CHAR_NAME);
     leaveParty(browser);
     browser.executeScript(`socket.emit("join_party", {leader_name: "${TEST_CHAR_NAME3}"});`);
     expectText("Cannot join - not invited anymore");
     leaveParty(browser3.instance);
 });
開發者ID:Tzook,項目名稱:lul,代碼行數:8,代碼來源:join.spec.ts

示例2: it

 it('should not let inviting if not party leader', () => {
     createParty(newBrowser.instance);
     joinParty(newBrowser.instance, browser, TEST_CHAR_NAME2, TEST_CHAR_NAME);
     browser.executeScript(`socket.emit("invite_to_party", {char_name: "${TEST_CHAR_NAME3}"});`);
     expectText("Cannot invite - must be party leader");
     leaveParty(newBrowser.instance);
     leaveParty(browser);
 });
開發者ID:Tzook,項目名稱:lul,代碼行數:8,代碼來源:invite.spec.ts

示例3: it

 it('should tell me how much gold i picked', () => {
     browser.executeScript(`socket.emit("dropped_gold", {amount: 5});`)
     getItemId().then(itemId => {
         clearLogs();
         browser.executeScript(`socket.emit("picked_item", {item_id: "${itemId}"});`)
         expectText(`"amount": 5`);
     });
 });
開發者ID:Tzook,項目名稱:lul,代碼行數:8,代碼來源:gold.spec.ts

示例4: it

 it('should reflect back the changed value', () => {
   page.navigateTo();
   return browser.executeScript('window.scrollTo(0, 500);').then(function() {
     const btns = page.getSegmentButtons();
     btns.chicken.click();
     expect(page.getRadioOutputText()).toEqual('chicken');
   });
 });
開發者ID:keithdmoore,項目名稱:ionic,代碼行數:8,代碼來源:group-inputs.e2e-spec.ts

示例5: it

 it('should reflect toggling the value', () => {
   page.navigateTo();
   return browser.executeScript('window.scrollTo(0, 500);').then(function() {
     const el = page.getIonicToggle();
     el.click();
     expect(page.getToggleOutput()).toEqual('true');
   });
 });
開發者ID:keithdmoore,項目名稱:ionic,代碼行數:8,代碼來源:basic-inputs.e2e-spec.ts

示例6: it

 it('should not kick member if not party leader', () => {
     createParty(browser);
     joinParty(browser, browser3.instance, TEST_CHAR_NAME, TEST_CHAR_NAME3);
     changeLeader(browser, browser3.instance, TEST_CHAR_NAME3);
     browser.executeScript(`socket.emit("kick_from_party", {char_name: "${TEST_CHAR_NAME3}"});`);
     expectText("Cannot kick - must be party leader");
     leaveParty(browser);
     leaveParty(browser3.instance);
 });
開發者ID:Tzook,項目名稱:lul,代碼行數:9,代碼來源:kick.spec.ts

示例7: getItemId

 getItemId().then(itemId => {
     clearLogs();
     browser.executeScript(`socket.emit("picked_item", {item_id: "${itemId}"});`)
     expectText(`"amount": 5`);
     leaveParty();
     leaveParty(newBrowser.instance);
     leaveParty(browser3.instance);
     // bring back the gold to the other char
     newBrowser.instance.executeScript(`socket.emit("dropped_gold", {amount: 5});`)
     expectText(`"amount": -5`, newBrowser.instance);
     pickItem();
 });
開發者ID:Tzook,項目名稱:lul,代碼行數:12,代碼來源:gold.spec.ts


注:本文中的protractor/built.browser類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。