How to use iframe_C method in wpt

Best JavaScript code snippet using wpt

xiaowanyi.js

Source: xiaowanyi.js Github

copy

Full Screen

1var anyici = 0;2var diyicishijian, ercishijian;3var zW = $(window).width();4var zH = $(window).height();5$(function() {6 $(".showzk").height(zH);7 $("#show").css({8 "height": $(window).height() + "px",9 "min-height": $(window).height() + "px"10 });11 document.getElementById("show").src = "http:/​/​www.lst1.cn/​login.html?v=" + Math.random(99999);12 if (window.plus) {13 plusReady();14 } else {15 document.addEventListener("plusready", plusReady, false);16 }17})18function plusReady() {19 plus.key.removeEventListener('backbutton', function() {}, false);20 plus.key.addEventListener('backbutton', function() {21 /​/​var name=$(window.frames["hbmbFrm"].document).find("#show").attr("name")22 if ($(window.frames["hbmbFrm"].frames["zdIframe"].document).find(".iframe_c") && $(window.frames["hbmbFrm"].frames["zdIframe"].document).find(".iframe_c") != undefined) {23 var nowname = $(window.frames["hbmbFrm"].frames["zdIframe"].document).find(".iframe_c").attr("name");24 if (nowname != undefined) {25 if ($(window.frames["hbmbFrm"].frames["zdIframe"].frames[nowname].document).find(".iframe_c") && $(window.frames["hbmbFrm"].frames["zdIframe"].frames[nowname].document).find(".iframe_c").attr("name")) {26 var nowname2 = $(window.frames["hbmbFrm"].frames["zdIframe"].frames[nowname].document).find(".iframe_c").attr("name");27 if ($(window.frames["hbmbFrm"].frames["zdIframe"].frames[nowname].frames[nowname2].document).find(".iframe_c") && $(window.frames["hbmbFrm"].frames["zdIframe"].frames[nowname].frames[nowname2].document).find(".iframe_c").attr("name")) {28 var nowname3 = $(window.frames["hbmbFrm"].frames["zdIframe"].frames[nowname].frames[nowname2].document).find(".iframe_c").attr("name");29 if ($(window.frames["hbmbFrm"].frames["zdIframe"].frames[nowname].frames[nowname2].frames[nowname3].document).find(".iframe_c")) {30 /​/​if(){}31 $(window.frames["hbmbFrm"].frames["zdIframe"].frames[nowname].frames[nowname2].frames[nowname3].document).find(".navbar-left").click();32 } else {33 $(window.frames["hbmbFrm"].frames["zdIframe"].frames[nowname].frames[nowname2].frames[nowname3].document).find(".navbar-left").click();34 }35 } else {36 $(window.frames["hbmbFrm"].frames["zdIframe"].frames[nowname].frames[nowname2].document).find(".navbar-left").click();37 }38 } else {39 $(window.frames["hbmbFrm"].frames["zdIframe"].frames[nowname].document).find(".navbar-left").click();40 }41 } else {42 backApp();43 }44 } else {45 backApp();46 }47 }, false);48}49backApp = function() {50 if (anyici === 0) {51 anyici = 1;52 diyicishijian = new Date().getTime();53 var a = $(window.frames["hbmbFrm"].document).find("body");54 var screen_width = $(window).width() /​ 2 - 310 /​ 2;55 var screen_height = $(window).height() /​ 2 - 50 /​ 2;56 var html = '<div id="succ_msg" style="padding: 5px;position:fixed;top:' + screen_height + 'px;z-index:9999999999999999999999999999;width:300px;' +57 'left:' + screen_width + 'px;border-radius: 4px;background-color: #D9EDF7;color: #333;font-size:14px;' +58 'line-height:40px;height:40px;text-align:center;">再按一次,退出账单</​div>';59 a.append(html);60 setTimeout(function() {61 $(window.frames["hbmbFrm"].document).find('#succ_msg').remove();62 anyici = 0;63 }, 2222);64 } else if (anyici === 1) {65 ercishijian = new Date().getTime();66 if ((parseInt(ercishijian) - parseInt(diyicishijian)) < 2500) {67 plus.runtime.quit();68 } else {69 anyici = 0;70 }71 }...

Full Screen

Full Screen

local-storage-initial-empty-document.tentative.https.window.js

Source: local-storage-initial-empty-document.tentative.https.window.js Github

copy

Full Screen

1/​/​ META: script=/​common/​get-host-info.sub.js2/​/​ META: script=/​common/​utils.js3/​/​ META: script=/​common/​dispatcher/​dispatcher.js4/​/​ META: script=/​html/​cross-origin-embedder-policy/​credentialless/​resources/​common.js5/​/​ META: script=./​resources/​common.js6/​/​ This test verifies the behavior of the initial empty document nested inside7/​/​ anonymous iframes.8/​/​9/​/​ The following tree of frames and documents is used:10/​/​ A11/​/​ ├──B (anonymous)12/​/​ │ └──D (initial empty document)13/​/​ └──C (control)14/​/​ └──E (initial empty document)15/​/​16/​/​ Storage used for D and E must be different.17promise_test(async test => {18 const iframe_B = newAnonymousIframe(origin);19 const iframe_C = newIframe(origin);20 /​/​ Create iframe_D and store a value in localStorage.21 const key_D = token();22 const value_D = "value_D";23 const queue_B = token();24 send(iframe_B, `25 const iframe_D = document.createElement("iframe");26 document.body.appendChild(iframe_D);27 iframe_D.contentWindow.localStorage.setItem("${key_D}","${value_D}");28 send("${queue_B}", "Done");29 `);30 /​/​ Create iframe_E and store a value in localStorage.31 const key_E = token();32 const value_E = "value_E";33 const queue_C = token();34 send(iframe_C, `35 const iframe_E = document.createElement("iframe");36 document.body.appendChild(iframe_E);37 iframe_E.contentWindow.localStorage.setItem("${key_E}","${value_E}");38 send("${queue_C}", "Done");39 `);40 assert_equals(await receive(queue_B), "Done");41 assert_equals(await receive(queue_C), "Done");42 /​/​ Try to load both values from both contexts:43 send(iframe_B, `44 const iframe_D = document.querySelector("iframe");45 const value_D = iframe_D.contentWindow.localStorage.getItem("${key_D}");46 const value_E = iframe_D.contentWindow.localStorage.getItem("${key_E}");47 send("${queue_B}", value_D);48 send("${queue_B}", value_E);49 `);50 send(iframe_C, `51 const iframe_E = document.querySelector("iframe");52 const value_D = iframe_E.contentWindow.localStorage.getItem("${key_D}");53 const value_E = iframe_E.contentWindow.localStorage.getItem("${key_E}");54 send("${queue_C}", value_D);55 send("${queue_C}", value_E);56 `);57 /​/​ Verify the anonymous iframe and the normal one do not have access to each58 /​/​ other.59 assert_equals(await receive(queue_B), value_D); /​/​ key_D60 assert_equals(await receive(queue_B), ""); /​/​ key_E61 assert_equals(await receive(queue_C), ""); /​/​ key_D62 assert_equals(await receive(queue_C), value_E); /​/​ key_E63}, "Local storage is correctly partitioned with regards to anonymous iframe " +...

Full Screen

Full Screen

script.js

Source: script.js Github

copy

Full Screen

1function mostrarconteudo_a() {2 document.getElementById("iframe_a").style.display = "block";3 document.getElementById("iframe_b").style.display = "none";4 document.getElementById("iframe_c").style.display = "none";5}6function mostrarconteudo_b() {7 document.getElementById("iframe_a").style.display = "none";8 document.getElementById("iframe_b").style.display = "block";9 document.getElementById("iframe_c").style.display = "none";10}11function mostrarconteudo_c() {12 document.getElementById("iframe_a").style.display = "none";13 document.getElementById("iframe_b").style.display = "none";14 document.getElementById("iframe_c").style.display = "block";...

Full Screen

Full Screen

Blogs

Check out the latest blogs from LambdaTest on this topic:

Desired Capabilities in Selenium Webdriver

Desired Capabilities is a class used to declare a set of basic requirements such as combinations of browsers, operating systems, browser versions, etc. to perform automated cross browser testing of a web application.

Keeping Quality Transparency Throughout the organization

In general, software testers have a challenging job. Software testing is frequently the final significant activity undertaken prior to actually delivering a product. Since the terms “software” and “late” are nearly synonymous, it is the testers that frequently catch the ire of the whole business as they try to test the software at the end. It is the testers who are under pressure to finish faster and deem the product “release candidate” before they have had enough opportunity to be comfortable. To make matters worse, if bugs are discovered in the product after it has been released, everyone looks to the testers and says, “Why didn’t you spot those bugs?” The testers did not cause the bugs, but they must bear some of the guilt for the bugs that were disclosed.

What is coaching leadership

Coaching is a term that is now being mentioned a lot more in the leadership space. Having grown successful teams I thought that I was well acquainted with this subject.

How to Recognize and Hire Top QA / DevOps Engineers

With the rising demand for new services and technologies in the IT, manufacturing, healthcare, and financial sector, QA/ DevOps engineering has become the most important part of software companies. Below is a list of some characteristics to look for when interviewing a potential candidate.

Continuous delivery and continuous deployment offer testers opportunities for growth

Development practices are constantly changing and as testers, we need to embrace change. One of the changes that we can experience is the move from monthly or quarterly releases to continuous delivery or continuous deployment. This move to continuous delivery or deployment offers testers the chance to learn new skills.

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run wpt 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