iframe

Using Selenium Webdriver to interact with Stripe Card Element iFrame - Cucumber/Selenium Java

南楼画角 提交于 2020-03-21 19:23:04
问题 I have an form that I want to automate using Cucumber and Selenium Webdriver in Java - in this form, we have a card element which we use from Stripe. We call the div, and stripe does the rest. I'm unsure if this is an iFrame, but when I use the Hooks.driver.findElement(By.xpath("xpathOfTheCardNumberField")).sendKeys("123"); command, it does not interact with it and returns the "Unable to locate element" error in the console log. I have asked our front-ender to perhaps try and add some ID's or

Using Selenium Webdriver to interact with Stripe Card Element iFrame - Cucumber/Selenium Java

房东的猫 提交于 2020-03-21 19:22:25
问题 I have an form that I want to automate using Cucumber and Selenium Webdriver in Java - in this form, we have a card element which we use from Stripe. We call the div, and stripe does the rest. I'm unsure if this is an iFrame, but when I use the Hooks.driver.findElement(By.xpath("xpathOfTheCardNumberField")).sendKeys("123"); command, it does not interact with it and returns the "Unable to locate element" error in the console log. I have asked our front-ender to perhaps try and add some ID's or

Using Selenium Webdriver to interact with Stripe Card Element iFrame - Cucumber/Selenium Java

帅比萌擦擦* 提交于 2020-03-21 19:21:22
问题 I have an form that I want to automate using Cucumber and Selenium Webdriver in Java - in this form, we have a card element which we use from Stripe. We call the div, and stripe does the rest. I'm unsure if this is an iFrame, but when I use the Hooks.driver.findElement(By.xpath("xpathOfTheCardNumberField")).sendKeys("123"); command, it does not interact with it and returns the "Unable to locate element" error in the console log. I have asked our front-ender to perhaps try and add some ID's or

iframe父子兄弟之间调用传值(contentWindow && parent)

折月煮酒 提交于 2020-03-21 14:32:09
学习一个知识点最好的方法就是自己动手去的实现一些简单的helloworld,虽然可以在网上可以找到很多总结,但自己实现的过程才是自己的,期间遇到问题并解决问题的过程也会让自己记忆理解更加深刻。 更多信息,请参考: http://www.cxyeye.com/ iframe的调用包括以下几个方面:(调用包含html dom,js全局变量,js方法) 主页面调用iframe; iframe页面调用主页面; 主页面的包含的iframe之间相互调用; 主要知识点 1:document.getElementById("ii").contentWindow 得到iframe对象后,就可以通过 contentWindow得到iframe包含页面的window对象,然后就可以正常访问页面元素了; 2:$("#ii")[0].contentWindow 如果用jquery选择器获得iframe,需要加一个【0】; 3:$("#ii")[0].contentWindow.$("#dd").val() 可以在得到iframe的window对象后接着使用jquery选择器进行页面操作; 4:$("#ii")[0].contentWindow.hellobaby="dsafdsafsdafsdafsdafsdafsadfsadfsdafsadfdsaffdsaaaaaaaaaaaaa";

Iframe wont respect login cookies

China☆狼群 提交于 2020-03-21 12:07:19
问题 I have a very strange issue that i have been trying to debug for more then a week now. I am out of ideas as to what the problem could be. I am hoping someone here may have run into this same problem before and be able to give me an idea what the issue could be and how to fix it. I a asp .net core 2.0 application. It runs fine when hosted stand alone. Main controller requires authentication. Logs into Identity server 4. (hybrid granttype) Returns to application fetches data and displays it.

Iframe wont respect login cookies

心已入冬 提交于 2020-03-21 12:07:08
问题 I have a very strange issue that i have been trying to debug for more then a week now. I am out of ideas as to what the problem could be. I am hoping someone here may have run into this same problem before and be able to give me an idea what the issue could be and how to fix it. I a asp .net core 2.0 application. It runs fine when hosted stand alone. Main controller requires authentication. Logs into Identity server 4. (hybrid granttype) Returns to application fetches data and displays it.

ExtAspNet应用技巧(十三) - 后台主页面(IFrame框架)

本秂侑毒 提交于 2020-03-21 07:47:44
书接上回,在 系统登录 之后,就要显示主页面了,先看下效果: 界面效果 点击“退出系统”按钮: 整个页面被分为了三部分,上面的是页面标题和工具栏;左侧的是系统菜单;右侧的主内容区域。 需要特别注意的是,在主内容区域我们使用了IFrame,这也是 ExtAspNet 提倡的一种做法。 这种IFrame框架不仅加快了页面的加载速度,而且代码逻辑以页面的形式组织划分,对于代码编写调试以及多人开发都极其有利。 ASPX标签 <ext:PageManager ID="PageManager1" AutoSizePanelID="BorderLayout1" HideScrollbar="true" runat="server" /> <ext:BorderLayout ID="BorderLayout1" ShowBorder="false" runat="server"> <Regions> <ext:Region ID="regionTop" Height="60px" ShowBorder="false" ShowHeader="false" Position="Top" Layout="Fit" runat="server"> </ext:Region> <ext:Region ID="regionLeft" Split="true" Width="200px" Margins="0

js跨域

爷,独闯天下 提交于 2020-03-20 06:10:48
转自 https://www.cnblogs.com/yongshaoye/p/7423881.html 一、了解跨域? 1 概念:只要协议、域名、端口有任何一个不同,都被当作是不同的域。 定义:跨域是指从一个域名的网页去请求另一个域名的资源。比如从www.baidu.com 页面去请求 www.google.com 的资源。但是一般情况下不能这么做,它是由浏览器的同源策略造成的,是浏览器对 JavaScript 施加的安全限制。 所谓同源是指,域名,协议,端口均相同。 这里说的js跨域是指通过js在不同的域之间进行数据传输或通信,比如用ajax向一个不同的域请求数据,或者通过js获取页面中不同域的框架中(iframe)的数据。 请注意:localhost和127.0.0.1虽然都指向本机,但也属于跨域。 浏览器执行 javascript 脚本时,会检查这个脚本属于哪个页面,如果不是同源页面,就不会被执行。 对于端口和协议的不同,只能通过后台来解决。 2 例: http://www.123.com/index.html 调用 http://www.123.com/server. PHP (非跨域) http://www.123.com/index.html 调用 http://www.456.com/server. php (主域名不同:123/456,跨域) http://abc

layui学习--tab选项卡

我的未来我决定 提交于 2020-03-18 22:11:48
var element; var $; layui.use(['element','jquery'],function(){ element = layui.element, $ = layui.jquery; //监听左侧菜单点击 element.on('nav(left-menu)', function(elem){ alert(elem.context.attributes+"sss"); addTab(elem[0].innerText,elem[0].attributes[1].nodeValue,elem[0].id); }); //监听tab选项卡切换 element.on('tab(tab-switch)', function(data){ var id = data.elem.context.attributes[0].nodeValue; layui.each($(".layui-nav-child"), function () { $(this).find("dd").removeClass("layui-this"); }); $("#"+id).attr("class","layui-this"); }); }); /** * 新增tab选项卡,如果已经存在则打开已经存在的,不存在则新增 * @param tabTitle 选项卡标题名称 * @param

js子窗口修改父窗口内容

烈酒焚心 提交于 2020-03-18 07:32:59
在框架中,我用 JavaScript 获取 JSON 数据,组织成 HTML 代码,最后将其填充至上层文档的一个元素中。按照一般的写法,我们需要用到类似如下的语句: 1. window.parent.document.getElementById( "myEle" ).innerHTML = html; 使用 jQuery ,写法如下: 1. $( "#myEle" , window.parent.document).html(html); 即指明了是在 window.parent.document 中查找 id=myEle 的元素。 随着前面的问题的解决(其实是对 jQuery 的了解不够),现在两种方案都可以实现我需要的效果了。 另外还有一种实现方式,代码如下: 1. parent.$( "#myEle" ).html(html); 这种方法要求父文档也要调用 jQuery 。 今天总结一下js中几个对象的区别和用法: 首先来说说 parent.window与top.window的用法 "window.location.href"、"location.href"是本页面跳转 "parent.location.href"是上一层页面跳转 "top.location.href"是最外层的页面跳转 举例说明: 如果A,B,C,D都是jsp,D是C的iframe,C是B的iframe