Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iframe 卡斯珀赢了';由于绑定,无法加载动态帧_Iframe_Casperjs - Fatal编程技术网

Iframe 卡斯珀赢了';由于绑定,无法加载动态帧

Iframe 卡斯珀赢了';由于绑定,无法加载动态帧,iframe,casperjs,Iframe,Casperjs,我有一个有框架的页面。该框架是从同一个(当前为:localhost)服务器加载的。但是,在加载框架后,页面假设将内容加载到该框架中(在每个浏览器中都会发生),但在casper中不会发生 我将以简单的步骤列出: 页面加载 框架荷载 将内容加载到框架中的页面 这最后一步,第3步是我们所缺少的。等待5秒钟没有任何帮助,每一个屏幕截图都返回到帧所在的空白位置 我使用了withFrame方法,我确实得到了框架,但它不会填充(得到了加载的代码,而不是每个浏览器中出现的完整代码) 使用错误检查后,casper

我有一个有框架的页面。该框架是从同一个(当前为:localhost)服务器加载的。但是,在加载框架后,页面假设将内容加载到该框架中(在每个浏览器中都会发生),但在casper中不会发生

我将以简单的步骤列出:

  • 页面加载
  • 框架荷载
  • 将内容加载到框架中的页面
  • 这最后一步,第3步是我们所缺少的。等待5秒钟没有任何帮助,每一个屏幕截图都返回到帧所在的空白位置

    我使用了
    withFrame
    方法,我确实得到了框架,但它不会填充(得到了加载的代码,而不是每个浏览器中出现的完整代码)

    使用错误检查后,casper似乎无法识别
    bind()
    方法。 我曾尝试注入一个绑定原型,如下所示:

        if (!Function.prototype.bind)
        {
            console.log('bind injecttor 1');
            Function.prototype.bind = function (oThis)
            {
            console.log('bind injecttor 2');
            if (typeof this !== "function")
            {
                console.log('bind injecttor error');
                // closest thing possible to the ECMAScript 5 internal IsCallable function
                throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
            }
    
            var aArgs = Array.prototype.slice.call(arguments, 1),
                fToBind = this,
                fNOP = function ()
                {
                },
                fBound = function ()
                {
                return fToBind.apply(this instanceof fNOP && oThis
                        ? this
                        : oThis,
                    aArgs.concat(Array.prototype.slice.call(arguments)));
                };
    
            fNOP.prototype = this.prototype;
            fBound.prototype = new fNOP();
    
            console.log('bind injected.');
            return fBound;
            };
        }
    

    现在,我拿到了第一根圆木,但其他的都没有。有什么想法吗?

    您应该检查和remote是否有错误。Message谢谢!我没有考虑过这个选择。卡斯珀似乎确实发现了一个错误。问题是——它不会出现在任何其他浏览器(chrome、FF、甚至浏览器)中。与bind有关的东西。我会更新问题的!看起来不支持
    bind
    ,请确实尝试“是”。问题是-我没有找到注入
    bind()
    函数的方法。我已经更新了问题,谢谢!如何注入bind原型?(将代码添加到您的问题中)