How to use linux method in Webdriverio

Best JavaScript code snippet using webdriverio-monorepo

BrowserAndOS.js

Source:BrowserAndOS.js Github

copy

Full Screen

1xdescribe("Ext.env.Browser and Ext.env.OS", function() {2 var profiles = {3 Safari_502_Mac: {4 platform: 'MacIntel',5 userAgent: 'Safari_5533.18.5Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5',6 expect: {7 browser: {8 name: 'Safari',9 flags: ['Safari', 'Safari5', 'Safari502', 'WebKit', 'WebKit533', 'WebKit533181'],10 version: '5.0.2'11 },12 os: {13 name: 'MacOS',14 flags: ['MacOS', 'MacIntel'],15 version: ''16 }17 }18 },19 Chrome_70517_Mac: {20 platform: 'MacIntel',21 userAgent: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7',22 expect: {23 browser: {24 name: 'Chrome',25 flags: ['Chrome', 'Chrome7', 'Chrome7051744', 'WebKit', 'WebKit5347', 'WebKit534'],26 version: '7.0.517.44'27 },28 os: {29 name: 'MacOS',30 flags: ['MacOS', 'MacIntel'],31 version: ''32 }33 }34 },35 iPad_32: {36 platform: 'iPad',37 userAgent: 'Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10',38 expect: {39 browser: {40 name: 'Safari',41 flags: ['Safari', 'Safari4', 'Safari404', 'WebKit', 'WebKit531', 'WebKit5312110'],42 version: '4.0.4'43 },44 os: {45 name: 'iOS',46 flags: ['iOS', 'iOS3', 'iOS32', 'iPad'],47 version: '3.2'48 }49 }50 },51 iPad_43: {52 platform: 'iPad',53 userAgent: 'Mozilla/5.0 (iPad; U; CPU OS 4_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8F190 Safari/6533.18.5',54 expect: {55 browser: {56 name: 'Safari',57 flags: ['Safari', 'Safari5', 'Safari502', 'WebKit', 'WebKit533', 'WebKit533179'],58 version: '5.0.2'59 },60 os: {61 name: 'iOS',62 flags: ['iOS', 'iOS4', 'iOS43', 'iPad'],63 version: '4.3'64 }65 }66 },67 iPhone_31: {68 platform: 'iPhone',69 userAgent: 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_3 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7E18 Safari/528.16',70 expect: {71 browser: {72 name: 'Safari',73 flags: ['Safari', 'Safari4', 'Safari40', 'WebKit', 'WebKit528', 'WebKit52818'],74 version: '4.0'75 },76 os: {77 name: 'iOS',78 flags: ['iOS', 'iOS3', 'iOS313', 'iPhone'],79 version: '3.1.3'80 }81 }82 },83 iPod_41: {84 platform: 'iPod',85 userAgent: 'Mozilla/5.0 (iPod; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B118 Safari/6531.22.7',86 expect: {87 browser: {88 name: 'Safari',89 flags: ['Safari', 'Safari4', 'Safari405', 'WebKit', 'WebKit532', 'WebKit5329'],90 version: '4.0.5'91 },92 os: {93 name: 'iOS',94 flags: ['iOS', 'iOS4', 'iOS41', 'iPod'],95 version: '4.1'96 }97 }98 },99 iPod_31: {100 platform: 'iPod',101 userAgent: 'Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_3 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7E18 Safari/528.16',102 expect: {103 browser: {104 name: 'Safari',105 flags: ['Safari', 'Safari4', 'Safari40', 'WebKit', 'WebKit528', 'WebKit52818'],106 version: '4.0'107 },108 os: {109 name: 'iOS',110 flags: ['iOS', 'iOS3', 'iOS313', 'iPod'],111 version: '3.1.3'112 }113 }114 },115 Android_22_G2: {116 platform: 'Linux armv7l',117 userAgent: ' Mozilla/5.0 (Linux; U; Android 2.2; en-us; T-Mobile G2 Build/ FRF91) AppleWebKit/533.1(KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',118 expect: {119 browser: {120 name: 'Safari',121 flags: ['Safari', 'Safari4', 'Safari40', 'WebKit', 'WebKit533', 'WebKit5331', 'AndroidStock'],122 version: '4.0'123 },124 os: {125 name: 'Android',126 flags: ['Android', 'Android2', 'Android22', 'Linux armv7l'],127 version: '2.2'128 }129 }130 },131 Android_22_Desire: {132 platform: 'Linux armv7l',133 userAgent: 'Mozilla/5.0 (Linux; U; Android 2.2; en-vn; Desire_A8181 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',134 expect: {135 browser: {136 name: 'Safari',137 flags: ['Safari', 'Safari4', 'Safari40', 'WebKit', 'WebKit533', 'WebKit5331', 'AndroidStock'],138 version: '4.0'139 },140 os: {141 name: 'Android',142 flags: ['Android', 'Android2', 'Android22', 'Linux armv7l'],143 version: '2.2'144 }145 }146 },147 Android_22_NexusOne: {148 platform: 'Linux armv7l',149 userAgent: 'Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/ FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',150 expect: {151 browser: {152 name: 'Safari',153 flags: ['Safari', 'Safari4', 'Safari40', 'WebKit', 'WebKit533', 'WebKit5331', 'AndroidStock'],154 version: '4.0'155 },156 os: {157 name: 'Android',158 flags: ['Android', 'Android2', 'Android22', 'Linux armv7l'],159 version: '2.2'160 }161 }162 },163 Android_21_GalaxyS: {164 platform: 'Linux armv7l',165 userAgent: 'Mozilla/5.0 (Linux; U; Android 2.1-update1; fr-fr; GT-I9000 Build/ECLAIR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17',166 expect: {167 browser: {168 name: 'Safari',169 flags: ['Safari', 'Safari4', 'Safari40', 'WebKit', 'WebKit530', 'WebKit53017', 'AndroidStock'],170 version: '4.0'171 },172 os: {173 name: 'Android',174 flags: ['Android', 'Android2', 'Android21', 'Linux armv7l'],175 version: '2.1update1'176 }177 }178 },179 BlackBerry_Torch: {180 platform: 'BlackBerry',181 userAgent: 'Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en-US) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.246 Mobile Safari/534.1+',182 expect: {183 browser: {184 name: 'Safari',185 flags: ['WebKit', 'WebKit534', 'WebKit5341', 'Safari', 'Safari6', 'Safari600246'],186 version: '6.0.0.246'187 },188 os: {189 name: 'BlackBerry',190 flags: ['BlackBerry', 'BlackBerry6', 'BlackBerry600246'],191 version: '6.0.0.246'192 }193 }194 },195 RIM_Tablet_PlayBook: {196 platform: 'BlackBerry',197 userAgent: 'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.7 Safari/534.11+',198 expect: {199 browser: {200 name: 'Safari',201 flags: ['WebKit', 'WebKit534', 'WebKit53411', 'Safari', 'Safari7', 'Safari7107'],202 version: '7.1.0.7'203 },204 os: {205 name: 'RIMTablet',206 flags: ['BlackBerry', 'RIMTablet', 'RIMTablet1', 'RIMTablet100'],207 version: '1.0.0'208 }209 }210 },211 "Android 3.0.1 / Samsung Galaxy Tab 10.1": {212 platform: 'Linux armv7l',213 userAgent: 'Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7510 Build/HRI83) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13',214 expect: {215 browser: {216 name: 'Safari',217 flags: ['WebKit', 'WebKit534', 'WebKit53413', 'Safari', 'Safari4', 'Safari40', 'AndroidStock'],218 version: '4.0'219 },220 os: {221 name: 'Android',222 flags: ['Android', 'Android3', 'Android301', 'Linux armv7l'],223 version: '3.0.1'224 }225 }226 },227 "Android 2.3.3 / Motorola Droid X": {228 platform: 'Linux armv7l',229 userAgent: 'Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; DROIDX Build/4.5.1_57_DX5-26) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',230 expect: {231 browser: {232 name: 'Safari',233 flags: ['WebKit', 'WebKit533', 'WebKit5331', 'Safari', 'Safari4', 'Safari40', 'AndroidStock'],234 version: '4.0'235 },236 os: {237 name: 'Android',238 flags: ['Android', 'Android2', 'Android233', 'Linux armv7l'],239 version: '2.3.3'240 }241 }242 },243 "HTC_Sensation_Z710e with OSX userAgent": {244 platform: '',245 userAgent: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; HTC_Sensation_Z710e; en-gb) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16',246 expect: {247 browser: {248 name: 'Safari',249 flags: ['Safari', 'Safari5', 'Safari50', 'WebKit', 'WebKit533', 'WebKit53316', 'safari', 'safari5', 'safari50', 'webkit', 'webkit533', 'webkit53316', 'AndroidStock'],250 version: '5.0'251 },252 os: {253 name: 'Android',254 flags: ['Android', 'Android2', 'Android23', 'android', 'android2', 'android23'],255 version: '2.3'256 }257 }258 },259 "Amazon Kindle Fire": {260 platform: '',261 userAgent: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.0.13.81_10003810) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true',262 expect: {263 browser: {264 name: 'Silk',265 flags: [ 'Silk', 'Silk1', 'Silk10138110003810', 'WebKit', 'WebKit533', 'WebKit53316', 'silk', 'silk1', 'silk10138110003810', 'webkit', 'webkit533', 'webkit53316', 'AndroidStock'],266 version: '1.0.13.81.10003810'267 },268 os: {269 name: 'Android',270 flags: ['Android', 'Android2', 'Android23', 'android', 'android2', 'android23'],271 version: '2.3'272 }273 }274 },275 "Amazon Kindle Fire Pro": {276 platform: '',277 userAgent: 'Mozilla/5.0 (Linux; U; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/2.1 Safari/535.19 Silk-Accelerated=true',278 expect: {279 browser: {280 name: 'Silk',281 flags: [ 'Silk', 'Silk2', 'Silk21', 'WebKit', 'WebKit535', 'WebKit53519', 'silk', 'silk2', 'silk21', 'webkit', 'webkit535', 'webkit53519', 'AndroidStock'],282 version: '2.1'283 },284 os: {285 name: 'Android',286 flags: ['Android', 'Android2', 'Android23', 'android', 'android2', 'android23'],287 version: '2.3'288 }289 }290 },291 "Motorola Xoom ICS Chrome": {292 platform: '',293 userAgent: 'Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Xoom Build/IML77) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Safari/535.7',294 expect: {295 browser: {296 name: 'ChromeMobile',297 flags: [ 'ChromeMobile', 'ChromeMobile16', 'ChromeMobile16091275', 'WebKit', 'WebKit535', 'WebKit5357', 'chromemobile', 'chromemobile16', 'chromemobile16091275', 'webkit', 'webkit535', 'webkit5357'],298 version: '16.0.912.75'299 },300 os: {301 name: 'Android',302 flags: ['Android', 'Android4', 'Android403', 'android', 'android4', 'android403'],303 version: '4.0.3'304 }305 }306 },307 "Asus Transformer Prime ICS Chrome": {308 platform: '',309 userAgent: 'Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Transformer Prime TF201 Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Safari/535.7',310 expect: {311 browser: {312 name: 'ChromeMobile',313 flags: [ 'ChromeMobile', 'ChromeMobile16', 'ChromeMobile16091275', 'WebKit', 'WebKit535', 'WebKit5357', 'chromemobile', 'chromemobile16', 'chromemobile16091275', 'webkit', 'webkit535', 'webkit5357'],314 version: '16.0.912.75'315 },316 os: {317 name: 'Android',318 flags: ['Android', 'Android4', 'Android403', 'android', 'android4', 'android403'],319 version: '4.0.3'320 }321 }322 },323 "Galaxy Nexus ICS Chrome": {324 platform: '',325 userAgent: 'Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Galaxy Nexus Build/ICL53F) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Mobile Safari/535.7',326 expect: {327 browser: {328 name: 'ChromeMobile',329 flags: [ 'ChromeMobile', 'ChromeMobile16', 'ChromeMobile16091275', 'WebKit', 'WebKit535', 'WebKit5357', 'chromemobile', 'chromemobile16', 'chromemobile16091275', 'webkit', 'webkit535', 'webkit5357'],330 version: '16.0.912.75'331 },332 os: {333 name: 'Android',334 flags: ['Android', 'Android4', 'Android403', 'android', 'android4', 'android403'],335 version: '4.0.3'336 }337 }338 },339 Facebook_iPhone: {340 platform: 'iPad',341 // userAgent: 'Mozilla/5.0 (iPad; U; CPU OS 4_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8F190 Safari/6533.18.5',342 userAgent: 'Mozilla/5.0 (iPad; U; CPU iPhone OS 4_3_3 like Mac OS X; en_US) AppleWebKit (KHTML, like Gecko) Mobile [FBAN/FBForIPhone;FBAV/4.1;FBBV/4100.0;FBDV/iPad2,1;FBMD/iPad;FBSN/iPhone OS;FBSV/4.3.3;FBSS/1; FBCR/;FBID/tablet;FBLC/en_US;FBSF/1.0]',343 expect: {344 browser: {345 name: 'Safari',346 flags: ['Safari', 'WebKit'],347 version: ''348 },349 os: {350 name: 'iOS',351 flags: ['iOS', 'iOS4', 'iOS433', 'iPad'],352 version: '4.3.3'353 }354 }355 },356 UIWebView: {357 platform: 'iPad',358 userAgent: 'Mozilla/5.0 (iPad; U; CPU OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile',359 expect: {360 browser: {361 name: 'Other',362 flags: ['WebKit', 'WebKit533', 'WebKit533179', 'WebView', 'webkit', 'webkit533', 'webkit533179', 'webview'],363 version: ''364 },365 os: {366 name: 'iOS',367 flags: ['iOS', 'iOS4', 'iOS432', 'iPad', 'ios', 'ios4', 'ios432', 'ipad'],368 version: '4.3.2'369 }370 }371 },372 "Samsung Galaxy S3 w/Opera Mobile": {373 platform: '',374 userAgent: 'Mozilla/5.0 (Linux; Android 4.1.2; GT-I9300 Build/JZO54K) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.123 Mobile Safari/537.22 OPR/14.0.1025.53005',375 expect: {376 browser: {377 name: 'Opera',378 flags: ['Opera', 'Opera14', 'Opera140', 'WebKit', 'WebKit537', 'WebKit53722', 'opera', 'opera14', 'opera140', 'webkit', 'webkit537', 'webkit53722'],379 version: '14.0'380 },381 os: {382 name: 'Android',383 flags: ['Android', 'Android4', 'Android412', 'android', 'android4', 'android412'],384 version: '4.1.2'385 }386 }387 },388 "Motorola Droid Bionic w/Opera Mobile": {389 platform: '',390 userAgent: 'Mozilla/5.0 (Linux; Android 2.3.4; DROID BIONIC Build/5.5.1_84_DBN-74) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.123 Mobile Safari/537.22 OPR/14.0.1025.53005',391 expect: {392 browser: {393 name: 'Opera',394 flags: ['Opera', 'Opera14', 'Opera140', 'WebKit', 'WebKit537', 'WebKit53722', 'opera', 'opera14', 'opera140', 'webkit', 'webkit537', 'webkit53722'],395 version: '14.0'396 },397 os: {398 name: 'Android',399 flags: ['Android', 'Android2', 'Android234', 'android', 'android2', 'android234'],400 version: '2.3.4'401 }402 }403 },404 "Tizen SDK 2.0": {405 platform: '',406 userAgent: 'Mozilla/5.0 (Linux; U; Tizen 2.0; en-us) AppleWebKit/537.1 (KHTML, like Gecko) Version/2.0 Mobile',407 expect: {408 browser: {409 name: 'Safari',410 flags: ['Safari', 'Safari2', 'Safari20', 'WebKit', 'WebKit537', 'WebKit5371', 'safari', 'safari2', 'safari20', 'webkit', 'webkit537', 'webkit5371'],411 version: '2.0'412 },413 os: {414 name: 'Tizen',415 flags: ['Tizen', 'Tizen2', 'Tizen20', 'tizen', 'tizen2', 'tizen20'],416 version: '2.0'417 }418 }419 }420 };421 Ext.Object.each(profiles, function(device, profile) {422 describe(device, function(){423 it("Ext.env.Browser", function() {424 var expected = profile.expect.browser,425 expectedFlags = expected.flags,426 env = new Ext.env.Browser(profile.userAgent),427 flags = [],428 i, k, ln, flag;429 new Ext.env.OS(profile.userAgent, profile.platform, env);430 expect(env.name).toBe(expected.name);431 expect(env.version.toString()).toBe(expected.version);432 for (i = 0,ln = expectedFlags.length; i < ln; i++) {433 flag = expectedFlags[i];434 Ext.Array.include(expectedFlags, flag.toLowerCase());435 }436 for (k in env.is) {437 if (!env.is.hasOwnProperty(k)) {438 continue;439 }440 if (env.is[k] === true) {441 flags.push(k);442 }443 }444 expect(flags.sort()).toEqual(expected.flags.sort());445 });446 it("Ext.env.OS", function() {447 var expected = profile.expect.os,448 expectedFlags = expected.flags,449 env = new Ext.env.OS(profile.userAgent, profile.platform),450 flags = [], i, k, ln, flag;451 for (i = 0,ln = expectedFlags.length; i < ln; i++) {452 flag = expectedFlags[i];453 Ext.Array.include(expectedFlags, flag.toLowerCase());454 }455 expect(env.name).toBe(expected.name);456 expect(env.version.toString()).toBe(expected.version);457 for (k in env.is) {458 if (!env.is.hasOwnProperty(k)) {459 continue;460 }461 if (env.is[k] === true) {462 flags.push(k);463 }464 }465 expect(flags.sort()).toEqual(expected.flags.sort());466 });467 });468 });...

Full Screen

Full Screen

xtscancodes.js

Source:xtscancodes.js Github

copy

Full Screen

1/*2 * This file is auto-generated from keymaps.csv on 2017-05-31 16:203 * Database checksum sha256(92fd165507f2a3b8c5b3fa56e425d45788dbcb98cf067a307527d91ce22cab94)4 * To re-generate, run:5 * keymap-gen --lang=js code-map keymaps.csv html atset16*/7export default {8 "Again": 0xe005, /* html:Again (Again) -> linux:129 (KEY_AGAIN) -> atset1:57349 */9 "AltLeft": 0x38, /* html:AltLeft (AltLeft) -> linux:56 (KEY_LEFTALT) -> atset1:56 */10 "AltRight": 0xe038, /* html:AltRight (AltRight) -> linux:100 (KEY_RIGHTALT) -> atset1:57400 */11 "ArrowDown": 0xe050, /* html:ArrowDown (ArrowDown) -> linux:108 (KEY_DOWN) -> atset1:57424 */12 "ArrowLeft": 0xe04b, /* html:ArrowLeft (ArrowLeft) -> linux:105 (KEY_LEFT) -> atset1:57419 */13 "ArrowRight": 0xe04d, /* html:ArrowRight (ArrowRight) -> linux:106 (KEY_RIGHT) -> atset1:57421 */14 "ArrowUp": 0xe048, /* html:ArrowUp (ArrowUp) -> linux:103 (KEY_UP) -> atset1:57416 */15 "AudioVolumeDown": 0xe02e, /* html:AudioVolumeDown (AudioVolumeDown) -> linux:114 (KEY_VOLUMEDOWN) -> atset1:57390 */16 "AudioVolumeMute": 0xe020, /* html:AudioVolumeMute (AudioVolumeMute) -> linux:113 (KEY_MUTE) -> atset1:57376 */17 "AudioVolumeUp": 0xe030, /* html:AudioVolumeUp (AudioVolumeUp) -> linux:115 (KEY_VOLUMEUP) -> atset1:57392 */18 "Backquote": 0x29, /* html:Backquote (Backquote) -> linux:41 (KEY_GRAVE) -> atset1:41 */19 "Backslash": 0x2b, /* html:Backslash (Backslash) -> linux:43 (KEY_BACKSLASH) -> atset1:43 */20 "Backspace": 0xe, /* html:Backspace (Backspace) -> linux:14 (KEY_BACKSPACE) -> atset1:14 */21 "BracketLeft": 0x1a, /* html:BracketLeft (BracketLeft) -> linux:26 (KEY_LEFTBRACE) -> atset1:26 */22 "BracketRight": 0x1b, /* html:BracketRight (BracketRight) -> linux:27 (KEY_RIGHTBRACE) -> atset1:27 */23 "BrowserBack": 0xe06a, /* html:BrowserBack (BrowserBack) -> linux:158 (KEY_BACK) -> atset1:57450 */24 "BrowserFavorites": 0xe066, /* html:BrowserFavorites (BrowserFavorites) -> linux:156 (KEY_BOOKMARKS) -> atset1:57446 */25 "BrowserForward": 0xe069, /* html:BrowserForward (BrowserForward) -> linux:159 (KEY_FORWARD) -> atset1:57449 */26 "BrowserHome": 0xe032, /* html:BrowserHome (BrowserHome) -> linux:172 (KEY_HOMEPAGE) -> atset1:57394 */27 "BrowserRefresh": 0xe067, /* html:BrowserRefresh (BrowserRefresh) -> linux:173 (KEY_REFRESH) -> atset1:57447 */28 "BrowserSearch": 0xe065, /* html:BrowserSearch (BrowserSearch) -> linux:217 (KEY_SEARCH) -> atset1:57445 */29 "BrowserStop": 0xe068, /* html:BrowserStop (BrowserStop) -> linux:128 (KEY_STOP) -> atset1:57448 */30 "CapsLock": 0x3a, /* html:CapsLock (CapsLock) -> linux:58 (KEY_CAPSLOCK) -> atset1:58 */31 "Comma": 0x33, /* html:Comma (Comma) -> linux:51 (KEY_COMMA) -> atset1:51 */32 "ContextMenu": 0xe05d, /* html:ContextMenu (ContextMenu) -> linux:127 (KEY_COMPOSE) -> atset1:57437 */33 "ControlLeft": 0x1d, /* html:ControlLeft (ControlLeft) -> linux:29 (KEY_LEFTCTRL) -> atset1:29 */34 "ControlRight": 0xe01d, /* html:ControlRight (ControlRight) -> linux:97 (KEY_RIGHTCTRL) -> atset1:57373 */35 "Convert": 0x79, /* html:Convert (Convert) -> linux:92 (KEY_HENKAN) -> atset1:121 */36 "Copy": 0xe078, /* html:Copy (Copy) -> linux:133 (KEY_COPY) -> atset1:57464 */37 "Cut": 0xe03c, /* html:Cut (Cut) -> linux:137 (KEY_CUT) -> atset1:57404 */38 "Delete": 0xe053, /* html:Delete (Delete) -> linux:111 (KEY_DELETE) -> atset1:57427 */39 "Digit0": 0xb, /* html:Digit0 (Digit0) -> linux:11 (KEY_0) -> atset1:11 */40 "Digit1": 0x2, /* html:Digit1 (Digit1) -> linux:2 (KEY_1) -> atset1:2 */41 "Digit2": 0x3, /* html:Digit2 (Digit2) -> linux:3 (KEY_2) -> atset1:3 */42 "Digit3": 0x4, /* html:Digit3 (Digit3) -> linux:4 (KEY_3) -> atset1:4 */43 "Digit4": 0x5, /* html:Digit4 (Digit4) -> linux:5 (KEY_4) -> atset1:5 */44 "Digit5": 0x6, /* html:Digit5 (Digit5) -> linux:6 (KEY_5) -> atset1:6 */45 "Digit6": 0x7, /* html:Digit6 (Digit6) -> linux:7 (KEY_6) -> atset1:7 */46 "Digit7": 0x8, /* html:Digit7 (Digit7) -> linux:8 (KEY_7) -> atset1:8 */47 "Digit8": 0x9, /* html:Digit8 (Digit8) -> linux:9 (KEY_8) -> atset1:9 */48 "Digit9": 0xa, /* html:Digit9 (Digit9) -> linux:10 (KEY_9) -> atset1:10 */49 "Eject": 0xe07d, /* html:Eject (Eject) -> linux:162 (KEY_EJECTCLOSECD) -> atset1:57469 */50 "End": 0xe04f, /* html:End (End) -> linux:107 (KEY_END) -> atset1:57423 */51 "Enter": 0x1c, /* html:Enter (Enter) -> linux:28 (KEY_ENTER) -> atset1:28 */52 "Equal": 0xd, /* html:Equal (Equal) -> linux:13 (KEY_EQUAL) -> atset1:13 */53 "Escape": 0x1, /* html:Escape (Escape) -> linux:1 (KEY_ESC) -> atset1:1 */54 "F1": 0x3b, /* html:F1 (F1) -> linux:59 (KEY_F1) -> atset1:59 */55 "F10": 0x44, /* html:F10 (F10) -> linux:68 (KEY_F10) -> atset1:68 */56 "F11": 0x57, /* html:F11 (F11) -> linux:87 (KEY_F11) -> atset1:87 */57 "F12": 0x58, /* html:F12 (F12) -> linux:88 (KEY_F12) -> atset1:88 */58 "F13": 0x5d, /* html:F13 (F13) -> linux:183 (KEY_F13) -> atset1:93 */59 "F14": 0x5e, /* html:F14 (F14) -> linux:184 (KEY_F14) -> atset1:94 */60 "F15": 0x5f, /* html:F15 (F15) -> linux:185 (KEY_F15) -> atset1:95 */61 "F16": 0x55, /* html:F16 (F16) -> linux:186 (KEY_F16) -> atset1:85 */62 "F17": 0xe003, /* html:F17 (F17) -> linux:187 (KEY_F17) -> atset1:57347 */63 "F18": 0xe077, /* html:F18 (F18) -> linux:188 (KEY_F18) -> atset1:57463 */64 "F19": 0xe004, /* html:F19 (F19) -> linux:189 (KEY_F19) -> atset1:57348 */65 "F2": 0x3c, /* html:F2 (F2) -> linux:60 (KEY_F2) -> atset1:60 */66 "F20": 0x5a, /* html:F20 (F20) -> linux:190 (KEY_F20) -> atset1:90 */67 "F21": 0x74, /* html:F21 (F21) -> linux:191 (KEY_F21) -> atset1:116 */68 "F22": 0xe079, /* html:F22 (F22) -> linux:192 (KEY_F22) -> atset1:57465 */69 "F23": 0x6d, /* html:F23 (F23) -> linux:193 (KEY_F23) -> atset1:109 */70 "F24": 0x6f, /* html:F24 (F24) -> linux:194 (KEY_F24) -> atset1:111 */71 "F3": 0x3d, /* html:F3 (F3) -> linux:61 (KEY_F3) -> atset1:61 */72 "F4": 0x3e, /* html:F4 (F4) -> linux:62 (KEY_F4) -> atset1:62 */73 "F5": 0x3f, /* html:F5 (F5) -> linux:63 (KEY_F5) -> atset1:63 */74 "F6": 0x40, /* html:F6 (F6) -> linux:64 (KEY_F6) -> atset1:64 */75 "F7": 0x41, /* html:F7 (F7) -> linux:65 (KEY_F7) -> atset1:65 */76 "F8": 0x42, /* html:F8 (F8) -> linux:66 (KEY_F8) -> atset1:66 */77 "F9": 0x43, /* html:F9 (F9) -> linux:67 (KEY_F9) -> atset1:67 */78 "Find": 0xe041, /* html:Find (Find) -> linux:136 (KEY_FIND) -> atset1:57409 */79 "Help": 0xe075, /* html:Help (Help) -> linux:138 (KEY_HELP) -> atset1:57461 */80 "Hiragana": 0x77, /* html:Hiragana (Lang4) -> linux:91 (KEY_HIRAGANA) -> atset1:119 */81 "Home": 0xe047, /* html:Home (Home) -> linux:102 (KEY_HOME) -> atset1:57415 */82 "Insert": 0xe052, /* html:Insert (Insert) -> linux:110 (KEY_INSERT) -> atset1:57426 */83 "IntlBackslash": 0x56, /* html:IntlBackslash (IntlBackslash) -> linux:86 (KEY_102ND) -> atset1:86 */84 "IntlRo": 0x73, /* html:IntlRo (IntlRo) -> linux:89 (KEY_RO) -> atset1:115 */85 "IntlYen": 0x7d, /* html:IntlYen (IntlYen) -> linux:124 (KEY_YEN) -> atset1:125 */86 "KanaMode": 0x70, /* html:KanaMode (KanaMode) -> linux:93 (KEY_KATAKANAHIRAGANA) -> atset1:112 */87 "Katakana": 0x78, /* html:Katakana (Lang3) -> linux:90 (KEY_KATAKANA) -> atset1:120 */88 "KeyA": 0x1e, /* html:KeyA (KeyA) -> linux:30 (KEY_A) -> atset1:30 */89 "KeyB": 0x30, /* html:KeyB (KeyB) -> linux:48 (KEY_B) -> atset1:48 */90 "KeyC": 0x2e, /* html:KeyC (KeyC) -> linux:46 (KEY_C) -> atset1:46 */91 "KeyD": 0x20, /* html:KeyD (KeyD) -> linux:32 (KEY_D) -> atset1:32 */92 "KeyE": 0x12, /* html:KeyE (KeyE) -> linux:18 (KEY_E) -> atset1:18 */93 "KeyF": 0x21, /* html:KeyF (KeyF) -> linux:33 (KEY_F) -> atset1:33 */94 "KeyG": 0x22, /* html:KeyG (KeyG) -> linux:34 (KEY_G) -> atset1:34 */95 "KeyH": 0x23, /* html:KeyH (KeyH) -> linux:35 (KEY_H) -> atset1:35 */96 "KeyI": 0x17, /* html:KeyI (KeyI) -> linux:23 (KEY_I) -> atset1:23 */97 "KeyJ": 0x24, /* html:KeyJ (KeyJ) -> linux:36 (KEY_J) -> atset1:36 */98 "KeyK": 0x25, /* html:KeyK (KeyK) -> linux:37 (KEY_K) -> atset1:37 */99 "KeyL": 0x26, /* html:KeyL (KeyL) -> linux:38 (KEY_L) -> atset1:38 */100 "KeyM": 0x32, /* html:KeyM (KeyM) -> linux:50 (KEY_M) -> atset1:50 */101 "KeyN": 0x31, /* html:KeyN (KeyN) -> linux:49 (KEY_N) -> atset1:49 */102 "KeyO": 0x18, /* html:KeyO (KeyO) -> linux:24 (KEY_O) -> atset1:24 */103 "KeyP": 0x19, /* html:KeyP (KeyP) -> linux:25 (KEY_P) -> atset1:25 */104 "KeyQ": 0x10, /* html:KeyQ (KeyQ) -> linux:16 (KEY_Q) -> atset1:16 */105 "KeyR": 0x13, /* html:KeyR (KeyR) -> linux:19 (KEY_R) -> atset1:19 */106 "KeyS": 0x1f, /* html:KeyS (KeyS) -> linux:31 (KEY_S) -> atset1:31 */107 "KeyT": 0x14, /* html:KeyT (KeyT) -> linux:20 (KEY_T) -> atset1:20 */108 "KeyU": 0x16, /* html:KeyU (KeyU) -> linux:22 (KEY_U) -> atset1:22 */109 "KeyV": 0x2f, /* html:KeyV (KeyV) -> linux:47 (KEY_V) -> atset1:47 */110 "KeyW": 0x11, /* html:KeyW (KeyW) -> linux:17 (KEY_W) -> atset1:17 */111 "KeyX": 0x2d, /* html:KeyX (KeyX) -> linux:45 (KEY_X) -> atset1:45 */112 "KeyY": 0x15, /* html:KeyY (KeyY) -> linux:21 (KEY_Y) -> atset1:21 */113 "KeyZ": 0x2c, /* html:KeyZ (KeyZ) -> linux:44 (KEY_Z) -> atset1:44 */114 "Lang3": 0x78, /* html:Lang3 (Lang3) -> linux:90 (KEY_KATAKANA) -> atset1:120 */115 "Lang4": 0x77, /* html:Lang4 (Lang4) -> linux:91 (KEY_HIRAGANA) -> atset1:119 */116 "Lang5": 0x76, /* html:Lang5 (Lang5) -> linux:85 (KEY_ZENKAKUHANKAKU) -> atset1:118 */117 "LaunchApp1": 0xe06b, /* html:LaunchApp1 (LaunchApp1) -> linux:157 (KEY_COMPUTER) -> atset1:57451 */118 "LaunchApp2": 0xe021, /* html:LaunchApp2 (LaunchApp2) -> linux:140 (KEY_CALC) -> atset1:57377 */119 "LaunchMail": 0xe06c, /* html:LaunchMail (LaunchMail) -> linux:155 (KEY_MAIL) -> atset1:57452 */120 "MediaPlayPause": 0xe022, /* html:MediaPlayPause (MediaPlayPause) -> linux:164 (KEY_PLAYPAUSE) -> atset1:57378 */121 "MediaSelect": 0xe06d, /* html:MediaSelect (MediaSelect) -> linux:226 (KEY_MEDIA) -> atset1:57453 */122 "MediaStop": 0xe024, /* html:MediaStop (MediaStop) -> linux:166 (KEY_STOPCD) -> atset1:57380 */123 "MediaTrackNext": 0xe019, /* html:MediaTrackNext (MediaTrackNext) -> linux:163 (KEY_NEXTSONG) -> atset1:57369 */124 "MediaTrackPrevious": 0xe010, /* html:MediaTrackPrevious (MediaTrackPrevious) -> linux:165 (KEY_PREVIOUSSONG) -> atset1:57360 */125 "MetaLeft": 0xe05b, /* html:MetaLeft (MetaLeft) -> linux:125 (KEY_LEFTMETA) -> atset1:57435 */126 "MetaRight": 0xe05c, /* html:MetaRight (MetaRight) -> linux:126 (KEY_RIGHTMETA) -> atset1:57436 */127 "Minus": 0xc, /* html:Minus (Minus) -> linux:12 (KEY_MINUS) -> atset1:12 */128 "NonConvert": 0x7b, /* html:NonConvert (NonConvert) -> linux:94 (KEY_MUHENKAN) -> atset1:123 */129 "NumLock": 0x45, /* html:NumLock (NumLock) -> linux:69 (KEY_NUMLOCK) -> atset1:69 */130 "Numpad0": 0x52, /* html:Numpad0 (Numpad0) -> linux:82 (KEY_KP0) -> atset1:82 */131 "Numpad1": 0x4f, /* html:Numpad1 (Numpad1) -> linux:79 (KEY_KP1) -> atset1:79 */132 "Numpad2": 0x50, /* html:Numpad2 (Numpad2) -> linux:80 (KEY_KP2) -> atset1:80 */133 "Numpad3": 0x51, /* html:Numpad3 (Numpad3) -> linux:81 (KEY_KP3) -> atset1:81 */134 "Numpad4": 0x4b, /* html:Numpad4 (Numpad4) -> linux:75 (KEY_KP4) -> atset1:75 */135 "Numpad5": 0x4c, /* html:Numpad5 (Numpad5) -> linux:76 (KEY_KP5) -> atset1:76 */136 "Numpad6": 0x4d, /* html:Numpad6 (Numpad6) -> linux:77 (KEY_KP6) -> atset1:77 */137 "Numpad7": 0x47, /* html:Numpad7 (Numpad7) -> linux:71 (KEY_KP7) -> atset1:71 */138 "Numpad8": 0x48, /* html:Numpad8 (Numpad8) -> linux:72 (KEY_KP8) -> atset1:72 */139 "Numpad9": 0x49, /* html:Numpad9 (Numpad9) -> linux:73 (KEY_KP9) -> atset1:73 */140 "NumpadAdd": 0x4e, /* html:NumpadAdd (NumpadAdd) -> linux:78 (KEY_KPPLUS) -> atset1:78 */141 "NumpadComma": 0x7e, /* html:NumpadComma (NumpadComma) -> linux:121 (KEY_KPCOMMA) -> atset1:126 */142 "NumpadDecimal": 0x53, /* html:NumpadDecimal (NumpadDecimal) -> linux:83 (KEY_KPDOT) -> atset1:83 */143 "NumpadDivide": 0xe035, /* html:NumpadDivide (NumpadDivide) -> linux:98 (KEY_KPSLASH) -> atset1:57397 */144 "NumpadEnter": 0xe01c, /* html:NumpadEnter (NumpadEnter) -> linux:96 (KEY_KPENTER) -> atset1:57372 */145 "NumpadEqual": 0x59, /* html:NumpadEqual (NumpadEqual) -> linux:117 (KEY_KPEQUAL) -> atset1:89 */146 "NumpadMultiply": 0x37, /* html:NumpadMultiply (NumpadMultiply) -> linux:55 (KEY_KPASTERISK) -> atset1:55 */147 "NumpadParenLeft": 0xe076, /* html:NumpadParenLeft (NumpadParenLeft) -> linux:179 (KEY_KPLEFTPAREN) -> atset1:57462 */148 "NumpadParenRight": 0xe07b, /* html:NumpadParenRight (NumpadParenRight) -> linux:180 (KEY_KPRIGHTPAREN) -> atset1:57467 */149 "NumpadSubtract": 0x4a, /* html:NumpadSubtract (NumpadSubtract) -> linux:74 (KEY_KPMINUS) -> atset1:74 */150 "Open": 0x64, /* html:Open (Open) -> linux:134 (KEY_OPEN) -> atset1:100 */151 "PageDown": 0xe051, /* html:PageDown (PageDown) -> linux:109 (KEY_PAGEDOWN) -> atset1:57425 */152 "PageUp": 0xe049, /* html:PageUp (PageUp) -> linux:104 (KEY_PAGEUP) -> atset1:57417 */153 "Paste": 0x65, /* html:Paste (Paste) -> linux:135 (KEY_PASTE) -> atset1:101 */154 "Pause": 0xe046, /* html:Pause (Pause) -> linux:119 (KEY_PAUSE) -> atset1:57414 */155 "Period": 0x34, /* html:Period (Period) -> linux:52 (KEY_DOT) -> atset1:52 */156 "Power": 0xe05e, /* html:Power (Power) -> linux:116 (KEY_POWER) -> atset1:57438 */157 "PrintScreen": 0x54, /* html:PrintScreen (PrintScreen) -> linux:99 (KEY_SYSRQ) -> atset1:84 */158 "Props": 0xe006, /* html:Props (Props) -> linux:130 (KEY_PROPS) -> atset1:57350 */159 "Quote": 0x28, /* html:Quote (Quote) -> linux:40 (KEY_APOSTROPHE) -> atset1:40 */160 "ScrollLock": 0x46, /* html:ScrollLock (ScrollLock) -> linux:70 (KEY_SCROLLLOCK) -> atset1:70 */161 "Semicolon": 0x27, /* html:Semicolon (Semicolon) -> linux:39 (KEY_SEMICOLON) -> atset1:39 */162 "ShiftLeft": 0x2a, /* html:ShiftLeft (ShiftLeft) -> linux:42 (KEY_LEFTSHIFT) -> atset1:42 */163 "ShiftRight": 0x36, /* html:ShiftRight (ShiftRight) -> linux:54 (KEY_RIGHTSHIFT) -> atset1:54 */164 "Slash": 0x35, /* html:Slash (Slash) -> linux:53 (KEY_SLASH) -> atset1:53 */165 "Sleep": 0xe05f, /* html:Sleep (Sleep) -> linux:142 (KEY_SLEEP) -> atset1:57439 */166 "Space": 0x39, /* html:Space (Space) -> linux:57 (KEY_SPACE) -> atset1:57 */167 "Suspend": 0xe025, /* html:Suspend (Suspend) -> linux:205 (KEY_SUSPEND) -> atset1:57381 */168 "Tab": 0xf, /* html:Tab (Tab) -> linux:15 (KEY_TAB) -> atset1:15 */169 "Undo": 0xe007, /* html:Undo (Undo) -> linux:131 (KEY_UNDO) -> atset1:57351 */170 "WakeUp": 0xe063, /* html:WakeUp (WakeUp) -> linux:143 (KEY_WAKEUP) -> atset1:57443 */...

Full Screen

Full Screen

test_agents.js

Source:test_agents.js Github

copy

Full Screen

1// Copyright 2013 The Closure Library Authors. All Rights Reserved.2//3// Licensed under the Apache License, Version 2.0 (the 'License');4// you may not use this file except in compliance with the License.5// You may obtain a copy of the License at6//7// http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// distributed under the License is distributed on an 'AS-IS' BASIS,11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12// See the License for the specific language governing permissions and13// limitations under the License.14/**15 * @fileoverview Various User-Agent strings.16 * See http://go/useragentexamples and http://www.useragentstring.com/ for17 * examples.18 *19 * @author martone@google.com (Andy Martone)20 */21goog.provide('goog.labs.userAgent.testAgents');22goog.setTestOnly('goog.labs.userAgent.testAgents');23goog.scope(function() {24var testAgents = goog.labs.userAgent.testAgents;25/** @const {string} */26testAgents.ANDROID_BROWSER_235 =27 'Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; ' +28 'HTC Vision Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) ' +29 'Version/4.0 Mobile Safari/533.1';30/** @const {string} */31testAgents.ANDROID_BROWSER_221 =32 'Mozilla/5.0 (Linux; U; Android 2.2.1; en-ca; LG-P505R Build/FRG83)' +33 ' AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';34/** @const {string} */35testAgents.ANDROID_BROWSER_233 =36 'Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; HTC_DesireS_S510e' +37 ' Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0' +38 ' Mobile Safari/533.1';39/** @const {string} */40testAgents.ANDROID_BROWSER_403 =41 'Mozilla/5.0 (Linux; U; Android 4.0.3; de-ch; HTC Sensation Build/IML74K)' +42 ' AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30';43/** @const {string} */44// User agent retrieved from dremel queries for cases matching b/1322268845testAgents.ANDROID_BROWSER_403_ALT =46 'Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K)' +47 ' AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30';48// Chromium for Android. Found in Android 4.4+ devices based on AOSP, but never49// in the 'Google' devices (where only Google Chrome is shipped).50// UA string matches Chromium based WebView exactly, see ANDROID_WEB_VIEW_4_4.51/** @const {string} */52testAgents.ANDROID_BROWSER_4_4 =53 'Mozilla/5.0 (Linux; Android 4.4.2; S8 Build/KOT49H) ' +54 'AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 ' +55 'Chrome/30.0.0.0 Mobile Safari/537.36';56// See https://developer.chrome.com/multidevice/user-agent57/** @const {string} */58testAgents.ANDROID_WEB_VIEW_4_1_1 =59 'Mozilla/5.0 (Linux; U; Android 4.1.1; en-gb; Build/KLP) ' +60 'AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30';61// See https://developer.chrome.com/multidevice/user-agent62/** @const {string} */63testAgents.ANDROID_WEB_VIEW_4_4 =64 'Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/_BuildID_) ' +65 'AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 ' +66 'Chrome/30.0.0.0 Mobile Safari/537.36';67/** @const {string} */68testAgents.IE_6 = 'Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1;' +69 '.NET CLR 2.0.50727)';70/** @const {string} */71testAgents.IE_7 = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)';72/** @const {string} */73testAgents.IE_8 =74 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)';75/** @const {string} */76testAgents.IE_8_COMPATIBILITY =77 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0)';78/** @const {string} */79testAgents.IE_9 =80 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)';81/** @const {string} */82testAgents.IE_9_COMPATIBILITY =83 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0)';84/** @const {string} */85testAgents.IE_10 =86 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';87/** @const {string} */88testAgents.IE_10_COMPATIBILITY =89 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0)';90/**91 * http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/10/17/getting-websites-ready-for-internet-explorer-10-on-windows-phone-8.aspx92 * @const {string}93 */94testAgents.IE_10_MOBILE =95 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; ' +96 'IEMobile/10.0; ARM; Touch; NOKIA; Lumia 820)';97/** @const {string} */98testAgents.IE_11 =99 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';100/** @const {string} */101testAgents.IE_11_COMPATIBILITY_MSIE_7 =102 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; Trident/7.0; ' +103 '.NET4.0E; .NET4.0C)';104/** @const {string} */105testAgents.IE_11_COMPATIBILITY_MSIE_9 =106 'Mozilla/5.0 (MSIE 9.0; Windows NT 6.1; WOW64; Trident/7.0; ' +107 'rv:11.0) like Gecko';108/**109 * https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396#edge110 * @const {string}111 */112testAgents.EDGE_12_0 =113 'Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 ' +114 '(KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Edge/12.0';115/** @const {string} */116testAgents.EDGE_12_9600 =117 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ' +118 '(KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.9600';119/** @const {string} */120testAgents.FIREFOX_19 =121 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) ' +122 'Gecko/20100101 Firefox/19.0';123/** @const {string} */124testAgents.FIREFOX_LINUX =125 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101' +126 ' Firefox/15.0.1';127/** @const {string} */128testAgents.FIREFOX_MAC =129 'Mozilla/6.0 (Macintosh; I; Intel Mac OS X 11_7_9; de-LI; rv:1.9b4)' +130 ' Gecko/2012010317 Firefox/10.0a4';131/** @const {string} */132testAgents.FIREFOX_WINDOWS =133 'Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507' +134 ' Firefox/14.0.1';135/** @const {string} */136testAgents.SAFARI_6 = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_1) ' +137 'AppleWebKit/536.25 (KHTML, like Gecko) ' +138 'Version/6.0 Safari/536.25';139/** @const {string} */140testAgents.SAFARI_IPHONE_32 =141 'Mozilla/5.0(iPhone; U; CPU iPhone OS 3_2 like Mac OS X; en-us)' +142 ' AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314' +143 ' Safari/531.21.10';144/** @const {string} */145testAgents.SAFARI_IPHONE_421 =146 'Mozilla/5.0 (iPhone; U; ru; CPU iPhone OS 4_2_1 like Mac OS X; ru)' +147 ' AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148a' +148 ' Safari/6533.18.5';149/** @const {string} */150testAgents.SAFARI_IPHONE_431 =151 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_1 like Mac OS X; zh-tw)' +152 ' AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8G4' +153 ' Safari/6533.18.5';154/** @const {string} */155testAgents.SAFARI_IPHONE_6 =156 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X)' +157 ' AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e' +158 ' Safari/8536.25';159/** @const {string} */160testAgents.SAFARI_IPOD =161 'Mozila/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1' +162 ' (KHTML, like Gecko) Version/3.0 Mobile/3A101a Safari/419.3';163/** @const {string} */164testAgents.SAFARI_MAC =165 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+' +166 ' (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2';167/** @const {string} */168testAgents.SAFARI_WINDOWS =169 'Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25' +170 ' (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27';171/** @const {string} */172testAgents.COAST =173 'Mozilla/5.0 (iPad; CPU OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1' +174 ' (KHTML like Gecko) Coast/1.1.2.64598 Mobile/11B511 Safari/7534.48.3';175/** @const {string} */176testAgents.WEBVIEW_IPHONE =177 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26' +178 ' (KHTML, like Gecko) Mobile/10A403';179/** @const {string} */180testAgents.WEBVIEW_IPAD =181 'Mozilla/5.0 (iPad; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26' +182 ' (KHTML, like Gecko) Mobile/10A403';183/** @const {string} */184testAgents.OPERA_MINI =185 'Opera/9.80 (Android; Opera Mini/7.6.35766/35.5706; U; en)' +186 ' Presto/2.8.119 Version/11.10';187/** @const {string} */188testAgents.OPERA_10 = 'Opera/9.80 (S60; SymbOS; Opera Mobi/447; U; en) ' +189 'Presto/2.4.18 Version/10.00';190/** @const {string} */191testAgents.OPERA_LINUX =192 'Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.9.168 Version/11.50';193/** @const {string} */194testAgents.OPERA_MAC =195 'Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168' +196 ' Version/11.52';197/** @const {string} */198testAgents.OPERA_15 =199 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' +200 '(KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.100';201/** @const {string} */202testAgents.IPAD_4 = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us)' +203 ' AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b' +204 ' Safari/531.21.10';205/** @const {string} */206testAgents.IPAD_5 =207 'Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X; en-us) AppleWebKit/534.46' +208 ' (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3';209/** @const {string} */210testAgents.IPAD_6 = 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) ' +211 'AppleWebKit/536.26 (KHTML, like Gecko) ' +212 'Version/6.0 Mobile/10A403 Safari/8536.25';213/** @const {string} */214testAgents.CHROME_25 = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) ' +215 'AppleWebKit/535.8 (KHTML, like Gecko) ' +216 'Chrome/25.0.1000.10 Safari/535.8';217/** @const {string} */218testAgents.CHROME_ANDROID =219 'Mozilla/5.0 (Linux; U; Android 4.0.2; en-us; Galaxy Nexus Build/ICL53F) ' +220 'AppleWebKit/535.7 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile ' +221 'Safari/535.7';222/** @const {string} */223testAgents.CHROME_ANDROID_PHONE_4_4 =224 'Mozilla/5.0 (Linux; Android 4.4.2; S8 Build/KOT49H) ' +225 'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Mobile ' +226 'Safari/537.36';227/** @const {string} */228testAgents.CHROME_ANDROID_TABLET =229 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) ' +230 'AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Safari/535.19';231/** @const {string} */232testAgents.CHROME_ANDROID_TABLET_4_4 =233 'Mozilla/5.0 (Linux; Android 4.4.4; Nexus 7 Build/KTU84P) ' +234 'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.93 Safari/537.36';235/** @const {string} */236testAgents.CHROME_IPHONE =237 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X; en-us) ' +238 'AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/22.0.1194.0 Mobile/11E53 ' +239 'Safari/7534.48.3';240/** @const {string} */241testAgents.CHROME_IPAD = 'Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) ' +242 'AppleWebKit/537.51.1 (KHTML, like Gecko) CriOS/32.0.1700.20 ' +243 'Mobile/11B554a Safari/9537.53';244/** @const {string} */245testAgents.CHROME_LINUX =246 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko)' +247 ' Chrome/26.0.1410.33 Safari/537.31';248/**249 * We traditionally use Appversion to detect X11250 * @const {string}251 */252testAgents.CHROME_LINUX_APPVERVERSION =253 '5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko)' +254 ' Chrome/26.0.1410.33 Safari/537.31';255/** @const {string} */256testAgents.CHROME_MAC =257 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17' +258 ' (KHTML, like Gecko) Chrome/24.0.1309.0 Safari/537.17';259/** @const {string} */260testAgents.CHROME_OS =261 'Mozilla/5.0 (X11; CrOS x86_64 3701.62.0) AppleWebKit/537.31 ' +262 '(KHTML, like Gecko) Chrome/26.0.1410.40 Safari/537.31';263/** @const {string} */264testAgents.CHROME_OS_910 =265 'Mozilla/5.0 (X11; U; CrOS i686 9.10.0; en-US) AppleWebKit/532.5' +266 ' (KHTML, like Gecko) Chrome/4.0.253.0 Safari/532.5';267/** @const {string} */268testAgents.KINDLE_FIRE =269 'Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K)' +270 ' AppleWebKit/535.19 (KHTML, like Gecko) Silk/2.1 Mobile Safari/535.19' +271 ' Silk-Accelerated=true';272/** @const {string} */273testAgents.FIREFOX_ANDROID_TABLET =274 'Mozilla/5.0 (Android; Tablet; rv:28.0) Gecko/28.0 Firefox/28.0';...

Full Screen

Full Screen

permissions.js

Source:permissions.js Github

copy

Full Screen

1/* jshint qunit: true */2/* global JSZip,JSZipTestUtils */3'use strict';4QUnit.module("permissions", function () {5 // touch file_{666,640,400,755}6 // mkdir dir_{777,755,500}7 // for mode in 777 755 500 666 640 400; do8 // chmod $mode *_$mode9 // done10 // then :11 // zip -r linux_zip.zip .12 // 7z a -r linux_7z.zip .13 // ...14 function assertUnixPermissions(file){15 function doAsserts(zip, fileName, dir, octal) {16 var mode = parseInt(octal, 8);17 equal(zip.files[fileName].dosPermissions, null, fileName + ", no DOS permissions");18 equal(zip.files[fileName].dir, dir, fileName + " dir flag");19 equal(zip.files[fileName].unixPermissions, mode, fileName + " mode " + octal);20 }21 stop();22 JSZip.loadAsync(file, {createFolders:false})23 .then(function(zip) {24 start();25 doAsserts(zip, "dir_777/", true, "40777");26 doAsserts(zip, "dir_755/", true, "40755");27 doAsserts(zip, "dir_500/", true, "40500");28 doAsserts(zip, "file_666", false, "100666");29 doAsserts(zip, "file_640", false, "100640");30 doAsserts(zip, "file_400", false, "100400");31 doAsserts(zip, "file_755", false, "100755");32 })['catch'](JSZipTestUtils.assertNoError);33 }34 function assertDosPermissions(file){35 function doAsserts(zip, fileName, dir, binary) {36 var mode = parseInt(binary, 2);37 equal(zip.files[fileName].unixPermissions, null, fileName + ", no UNIX permissions");38 equal(zip.files[fileName].dir, dir, fileName + " dir flag");39 equal(zip.files[fileName].dosPermissions, mode, fileName + " mode " + mode);40 }41 stop();42 JSZip.loadAsync(file, {createFolders:false})43 .then(function(zip) {44 start();45 if (zip.files["dir/"]) {46 doAsserts(zip, "dir/", true, "010000");47 }48 if (zip.files["dir_hidden/"]) {49 doAsserts(zip, "dir_hidden/", true, "010010");50 }51 doAsserts(zip, "file", false, "100000");52 doAsserts(zip, "file_ro", false, "100001");53 doAsserts(zip, "file_hidden", false, "100010");54 doAsserts(zip, "file_ro_hidden", false, "100011");55 })['catch'](JSZipTestUtils.assertNoError);56 }57 function reloadAndAssertUnixPermissions(file){58 stop();59 JSZip.loadAsync(file, {createFolders:false})60 .then(function (zip) {61 return zip.generateAsync({type:"string", platform:"UNIX"});62 })63 .then(function (content) {64 start();65 assertUnixPermissions(content);66 })['catch'](JSZipTestUtils.assertNoError);67 }68 function reloadAndAssertDosPermissions(file){69 stop();70 JSZip.loadAsync(file, {createFolders:false})71 .then(function (zip) {72 return zip.generateAsync({type:"string", platform:"DOS"});73 })74 .then(function (content) {75 start();76 assertDosPermissions(content);77 })['catch'](JSZipTestUtils.assertNoError);78 }79 JSZipTestUtils.testZipFile("permissions on linux : file created by zip", "ref/permissions/linux_zip.zip", assertUnixPermissions);80 JSZipTestUtils.testZipFile("permissions on linux : file created by zip, reloaded", "ref/permissions/linux_zip.zip", reloadAndAssertUnixPermissions);81 JSZipTestUtils.testZipFile("permissions on linux : file created by 7z", "ref/permissions/linux_7z.zip", assertUnixPermissions);82 JSZipTestUtils.testZipFile("permissions on linux : file created by 7z, reloaded", "ref/permissions/linux_7z.zip", reloadAndAssertUnixPermissions);83 JSZipTestUtils.testZipFile("permissions on linux : file created by file-roller on ubuntu", "ref/permissions/linux_file_roller-ubuntu.zip", assertUnixPermissions);84 JSZipTestUtils.testZipFile("permissions on linux : file created by file-roller on ubuntu, reloaded", "ref/permissions/linux_file_roller-ubuntu.zip", reloadAndAssertUnixPermissions);85 JSZipTestUtils.testZipFile("permissions on linux : file created by file-roller on xubuntu", "ref/permissions/linux_file_roller-xubuntu.zip", assertUnixPermissions);86 JSZipTestUtils.testZipFile("permissions on linux : file created by file-roller on xubuntu, reloaded", "ref/permissions/linux_file_roller-xubuntu.zip", reloadAndAssertUnixPermissions);87 JSZipTestUtils.testZipFile("permissions on linux : file created by ark", "ref/permissions/linux_ark.zip", assertUnixPermissions);88 JSZipTestUtils.testZipFile("permissions on linux : file created by ark, reloaded", "ref/permissions/linux_ark.zip", reloadAndAssertUnixPermissions);89 JSZipTestUtils.testZipFile("permissions on mac : file created by finder", "ref/permissions/mac_finder.zip", assertUnixPermissions);90 JSZipTestUtils.testZipFile("permissions on mac : file created by finder, reloaded", "ref/permissions/mac_finder.zip", reloadAndAssertUnixPermissions);91 JSZipTestUtils.testZipFile("permissions on windows : file created by the compressed folders feature", "ref/permissions/windows_compressed_folders.zip", assertDosPermissions);92 JSZipTestUtils.testZipFile("permissions on windows : file created by the compressed folders feature, reloaded", "ref/permissions/windows_compressed_folders.zip", reloadAndAssertDosPermissions);93 JSZipTestUtils.testZipFile("permissions on windows : file created by 7z", "ref/permissions/windows_7z.zip", assertDosPermissions);94 JSZipTestUtils.testZipFile("permissions on windows : file created by 7z, reloaded", "ref/permissions/windows_7z.zip", reloadAndAssertDosPermissions);95 JSZipTestUtils.testZipFile("permissions on windows : file created by izarc", "ref/permissions/windows_izarc.zip", assertDosPermissions);96 JSZipTestUtils.testZipFile("permissions on windows : file created by izarc, reloaded", "ref/permissions/windows_izarc.zip", reloadAndAssertDosPermissions);97 JSZipTestUtils.testZipFile("permissions on windows : file created by winrar", "ref/permissions/windows_winrar.zip", assertDosPermissions);98 JSZipTestUtils.testZipFile("permissions on windows : file created by winrar, reloaded", "ref/permissions/windows_winrar.zip", reloadAndAssertDosPermissions);...

Full Screen

Full Screen

constants.js

Source:constants.js Github

copy

Full Screen

1/*2* ConVirt - Copyright (c) 2008 Convirture Corp.3* ======4* ConVirt is a Virtualization management tool with a graphical user5* interface that allows for performing the standard set of VM operations6* (start, stop, pause, kill, shutdown, reboot, snapshot, etc...). It7* also attempts to simplify various aspects of VM lifecycle management.8* This software is subject to the GNU General Public License, Version 2 (GPLv2)9* and for details, please consult it at:10* http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt11* author : Jd <jd_jedi@users.sourceforge.net>12*/13var convirt={};14convirt.constants={15 DATA_CENTER : "DATA_CENTER",16 SERVER_POOL : "SERVER_POOL",17 MANAGED_NODE : "MANAGED_NODE",18 DOMAIN : "DOMAIN",19 IMAGE_STORE : "IMAGE_STORE",20 IMAGE_GROUP : "IMAGE_GROUP",21 IMAGE : "IMAGE"22 ,CPU : "CPU"23 ,VMCPU : "VM CPU"24 ,MEM : "Memory"25 ,TOP5SERVERS:"TOP5SERVERS"26 ,COMPARISONCHART:"COMPARISONCHART"27 ,TOP50BYCPU : "Top 50 Servers by Host CPU(%)"28 ,TOP50BYMEM : "Top 50 Servers by Host Memory(%)"29 ,TOP50BYCPUVM : "Top 50 VMs by CPU Util(%)"30 ,TOP50BYMEMVM : "Top 50 VMs by Memory Util(%)"31 ,MEMUTIL_TEXT : "Host Memory(%)"32 ,CPUUTIL_TEXT : "Host CPU(%)"33 ,STRGUTIL_TEXT : "Storage(%)"34 ,VM_MEMUTIL_TEXT : "Memory(%)"35 ,VM_CPUUTIL_TEXT : "CPU(%)"36 ,VM_STRGUTIL_TEXT : "Storage(GB)"37 ,SP_TEXT : "Server Pool"38 ,SB_TEXT : "Standby server(yes/no)"39 ,SRVR_STATUS_TEXT : "Server Status(up/down)"40 ,SRVR_NAME_TEXT : "Server Name"41 ,OS_TEXT : "Operating System"42 ,PLTFM_TEXT : "Server Platform "43 ,VM_NAME_TEXT : "Virtual Machine"44 ,VM_STATUS_TEXT : "Status(up/down)"45 ,TEMPLATE_TEXT : "Template"46 ,DTD:"DTD"47 ,HRS12:"12HRS"48 ,HRS24:"24HRS"49 ,DAYS7:"7DAYS"50 ,DAYS30:"30DAYS"51 ,WTD:"WTD"52 ,MTD:"MTD"53 ,CUSTOM:"CUSTOM"54 ,VMS:"VMS"55 ,SERVERS:"SERVERS"56 ,SPECIAL_NODE:"SPECIAL_NODE"57 ,RUNNING : "0"58 ,BLOCKED : "1"59 ,PAUSED : "2"60 ,SHUTDOWN : "3"61 ,CRASHED : "4"62 ,NOT_STARTED : "-1"63 ,UNKNOWN : "-2"64 ,DOWN_RUNNING : "D_0"65 ,DOWN_BLOCKED : "D_1"66 ,DOWN_PAUSED : "D_2"67 ,DOWN_SHUTDOWN : "D_3"68 ,DOWN_CRASHED : "D_4"69 ,DOWN_NOT_STARTED : "D_-1"70 ,DOWN_UNKNOWN : "D_-2"71 ,OUTSIDE_DOMAIN:"OUTSIDE"72 ,OS_FLAVORS:[73 ['Linux', 'Linux'],74 ['Windows', 'Windows']75 ]76 ,OS_NAMES :[77 ['SUSE', 'SUSE', 'Linux'],78 ['SLES', 'SLES', 'Linux'],79 ['CentOS', 'CentOS', 'Linux'],80 ['Ubuntu', 'Ubuntu', 'Linux'],81 ['RHEL', 'RHEL', 'Linux'],82 ['Debian', 'Debian', 'Linux'],83 ['Gentoo', 'Gentoo', 'Linux'],84 ['Fedora', 'Fedora', 'Linux'],85 ['Windows 2008', 'Windows 2008', 'Windows'],86 ['Windows XP', 'Windows XP', 'Windows'],87 ['Windows NT', 'Windows NT', 'Windows'],88 ['Windows 2003', 'Windows 2003', 'Windows'],89 ['Windows 7', 'Windows 7', 'Windows']90 ]91 ,VM_CONSOLE:"VM_CONSOLE"92 ,VM_CONSOLE_LOCAL_CMD:"VM_CONSOLE_LOCAL_CMD"93 ,upgrade_to_ee:"http://www.convirture.com/contact.php?option=upgrade2ee"94 ,learn_about_ee:"http://www.convirture.com/products_enterprise.php"...

Full Screen

Full Screen

linuxos.js

Source:linuxos.js Github

copy

Full Screen

1import LinuxOS from '../models/linuxos.js'2//Get all3async function getAllLinuxOS(req, res){4 try {5 const allLinuxOS = await LinuxOS.find()6 // const allLinuxOS = []7 res.json(allLinuxOS)8 } catch (error) {9 console.log(error.message)10 res.status(500).json({message : error.message})11 }12}13//Get one14async function getLinuxOSbyId(req, res){15 try {16 const linuxOS = await LinuxOS.findById(req.params.id)17 res.json(linuxOS)18 } catch (error) {19 console.log(error.message)20 res.status(404).json({message : error.message})21 }22}23//Create24async function createLinuxOS(req, res){25 try {26 console.log(req.body.name)27 const NewLinuxOS = new LinuxOS({name: req.body.name})28 await NewLinuxOS.save()29 res.json(NewLinuxOS) 30 } catch (error) {31 res.json({message : error.message})32 }33}34//Update35async function updateLinuxOS(req, res){36 try {37 //ir buscar o registo existente -> pelo id38 const recordToUpdate = await LinuxOS.findById(req.params.id)39 40 //fazer as alteracoes41 recordToUpdate.name = req.body.name42 //gravar as alteracoes43 await recordToUpdate.save()44 45 // terminamos com sucesso ou nao46 res.json(recordToUpdate) 47 } catch (error) {48 res.json({message : error.message})49 }50}51//Delete52async function deleteLinuxOS(req, res){53 try {54 await LinuxOS.findByIdAndRemove(req.params.id)55 res.json({message: 'LinuxOS has been removed'})56 } catch (error) {57 res.status(500).json({message: error.message})58 }59}...

Full Screen

Full Screen

hits.js

Source:hits.js Github

copy

Full Screen

1define(function (require) {2 var _ = require('lodash');3 return _.map([4 {_source: {'@timestamp': 0, ssl: true, ip: '192.168.0.1', extension: 'php', 'machine.os': 'Linux', bytes: 10, request: 'foo'}},5 {_source: {'@timestamp': 1, ssl: true, ip: '192.168.0.1', extension: 'php', 'machine.os': 'Linux', bytes: 20, request: 'bar'}},6 {_source: {'@timestamp': 2, ssl: true, ip: '192.168.0.1', extension: 'php', 'machine.os': 'Linux', bytes: 30, request: 'bar'}},7 {_source: {'@timestamp': 3, ssl: true, ip: '192.168.0.1', extension: 'php', 'machine.os': 'Linux', bytes: 30, request: 'baz'}},8 {_source: {'@timestamp': 4, ssl: true, ip: '192.168.0.1', extension: 'php', 'machine.os': 'Linux', bytes: 30, request: 'baz'}},9 {_source: {'@timestamp': 5, ssl: true, ip: '192.168.0.1', extension: 'php', 'machine.os': 'Linux', bytes: 30, request: 'baz'}},10 {_source: {'@timestamp': 6, ssl: true, ip: '192.168.0.1', extension: 'php', 'machine.os': 'Linux', bytes: 40.141592, request: 'bat'}},11 {_source: {'@timestamp': 7, ssl: true, ip: '192.168.0.1', extension: 'php', 'machine.os': 'Linux', bytes: 40.141592, request: 'bat'}},12 {_source: {'@timestamp': 8, ssl: true, ip: '192.168.0.1', extension: 'php', 'machine.os': 'Linux', bytes: 40.141592, request: 'bat'}},13 {_source: {'@timestamp': 9, ssl: true, ip: '192.168.0.1', extension: 'php', 'machine.os': 'Linux', bytes: 40.141592, request: 'bat'}},14 ], function (p, i) {15 return _.merge({}, p, {16 _score: 1,17 _id: 1000 + i,18 _type: 'test',19 _index: 'test-index'20 });21 });...

Full Screen

Full Screen

index.js

Source:index.js Github

copy

Full Screen

1module.exports = [2 require("./xbox360-chrome-windows-osx.json"),3 require("./xbox360-ff-windows.json"),4 require("./xbox360-ff-linux.json"),5 require("./xbone-chrome-linux.json"),6 require("./xbone-chrome-osx-linux.json"),7 require("./xbone-ff-linux.json"),8 require("./logitechf310-directinput-chrome-ff-linux.json"),9 require("./logitechf310-directinput-chrome-windows-osx.json"),10 require("./logitechf310-directinput-ff-osx.json"),11 require("./logitechf310-directinput-ff-windows.json"),12 require("./logitechf310-xinput-chrome-linux.json"),13 require("./logitechf310-xinput-ff-linux.json"),14 require("./ps3-chrome-osx-linux.json"),15 require("./ps3-ff-linux.json"),16 require("./ps4-chrome-linux.json"),17 require("./ps4-chrome-windows-osx.json"),18 require("./ps4-ff-linux.json"),19 require("./ps4-ff-osx.json")...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var webdriverio = require('webdriverio');2var options = {3 desiredCapabilities: {4 }5};6 .remote(options)7 .init()8 .getTitle().then(function(title) {9 console.log('Title was: ' + title);10 })11 .end();

Full Screen

Using AI Code Generation

copy

Full Screen

1var webdriverio = require('webdriverio');2var options = {3 desiredCapabilities: {4 }5};6 .remote(options)7 .init()8 .getTitle().then(function(title) {9 console.log('Title was: ' + title);10 })11 .end();12var webdriverio = require('webdriverio');13var options = {14 desiredCapabilities: {15 }16};17 .remote(options)18 .init()19 .getTitle().then(function(title) {20 console.log('Title was: ' + title);21 })22 .end();23Your name to display (optional):24Your name to display (optional):25Your name to display (optional):

Full Screen

Using AI Code Generation

copy

Full Screen

1const { remote } = require('webdriverio');2(async () => {3 const browser = await remote({4 capabilities: {5 'goog:chromeOptions': {6 }7 }8 })9 console.log(await browser.getTitle())10 await browser.deleteSession()11})()

Full Screen

Using AI Code Generation

copy

Full Screen

1const { remote } = require('webdriverio');2(async () => {3 const browser = await remote({4 capabilities: {5 'goog:chromeOptions': {6 }7 }8 })9 const title = await browser.getTitle()10 console.log('Title was: ' + title)11 await browser.deleteSession()12})().catch((e) => console.error(e))13const { remote } = require('webdriverio');14(async () => {15 const browser = await remote({16 capabilities: {17 'goog:chromeOptions': {18 }19 }20 })21 const title = await browser.getTitle()22 console.log('Title was: ' + title)23 await browser.deleteSession()24})().catch((e) => console.error(e))25const { Builder, By, Key, until } = require('selenium-webdriver');26const { Options } = require('selenium-webdriver/chrome');27(async function example() {28 let driver = await new Builder()29 .forBrowser('chrome')30 .setChromeOptions(new Options().addArguments('--headless', '--disable-gpu', '--window-size=800x600'))31 .build();32 try {33 console.log(await driver.getTitle());34 } finally {35 await driver.quit();36 }37})();38const { Builder, By, Key, until } = require('selenium-webdriver');39const { Options } = require('selenium-webdriver/chrome');40(async function example() {41 let driver = await new Builder()42 .forBrowser('chrome')43 .setChromeOptions(new Options().addArguments('--headless', '--disable-gpu', '--window-size=800x600', '--no-sandbox'))44 .build();45 try {46 console.log(await

Full Screen

Using AI Code Generation

copy

Full Screen

1const { remote } = require('webdriverio');2(async () => {3 const browser = await remote({4 capabilities: {5 }6 })7 console.log(await browser.getTitle())8 await browser.deleteSession();9})().catch((e) => console.error(e))

Full Screen

Using AI Code Generation

copy

Full Screen

1const { remote } = require('webdriverio');2const opts = {3 capabilities: {4 }5};6(async () => {7 const browser = await remote(opts);8 await browser.deleteCookies();9 await browser.deleteCookies('NID');10 await browser.deleteCookies(['NID', '1P_JAR']);11 await browser.deleteAllCookies();12 await browser.deleteAllCookies();13 await browser.deleteCookie('NID');14 await browser.deleteCookie(['NID', '1P_JAR']);15 await browser.deleteCookie();16 await browser.deleteCookie();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { remote } = require('webdriverio');2const opts = {3 capabilities: {4 }5};6(async () => {7 const client = await remote(opts);8 await client.pause(5000);9 const text = await client.$('android=new UiSelector().text("9")');10 await text.click();11 await client.pause(5000);12 await client.deleteSession();13})();14Error: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/abhinavjain/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n com.android.calculator2/com.android.calculator2.Calculator -S' exited with code 4294967295'; Stderr: ''; Code: '4294967295'

Full Screen

WebdriverIO Tutorial

Wondering what could be a next-gen browser and mobile test automation framework that is also simple and concise? Yes, that’s right, it's WebdriverIO. Since the setup is very easy to follow compared to Selenium testing configuration, you can configure the features manually thereby being the center of attraction for automation testing. Therefore the testers adopt WedriverIO to fulfill their needs of browser testing.

Learn to run automation testing with WebdriverIO tutorial. Go from a beginner to a professional automation test expert with LambdaTest WebdriverIO tutorial.

Chapters

  1. Running Your First Automation Script - Learn the steps involved to execute your first Test Automation Script using WebdriverIO since the setup is very easy to follow and the features can be configured manually.

  2. Selenium Automation With WebdriverIO - Read more about automation testing with WebdriverIO and how it supports both browsers and mobile devices.

  3. Browser Commands For Selenium Testing - Understand more about the barriers faced while working on your Selenium Automation Scripts in WebdriverIO, the ‘browser’ object and how to use them?

  4. Handling Alerts & Overlay In Selenium - Learn different types of alerts faced during automation, how to handle these alerts and pops and also overlay modal in WebdriverIO.

  5. How To Use Selenium Locators? - Understand how Webdriver uses selenium locators in a most unique way since having to choose web elements very carefully for script execution is very important to get stable test results.

  6. Deep Selectors In Selenium WebdriverIO - The most popular automation testing framework that is extensively adopted by all the testers at a global level is WebdriverIO. Learn how you can use Deep Selectors in Selenium WebdriverIO.

  7. Handling Dropdown In Selenium - Learn more about handling dropdowns and how it's important while performing automated browser testing.

  8. Automated Monkey Testing with Selenium & WebdriverIO - Understand how you can leverage the amazing quality of WebdriverIO along with selenium framework to automate monkey testing of your website or web applications.

  9. JavaScript Testing with Selenium and WebdriverIO - Speed up your Javascript testing with Selenium and WebdriverIO.

  10. Cross Browser Testing With WebdriverIO - Learn more with this step-by-step tutorial about WebdriverIO framework and how cross-browser testing is done with WebdriverIO.

Run Webdriverio automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful