Geb withFrame - “call function result missing 'value'”









up vote
1
down vote

favorite












I'm new to using withFrames in Geb, and I am trying to follow the examples in the Book of Geb.



I am trying to get my code to enter text and push a button within a frame.



The preferred way is to define the frame element inside your containing page, but for now I just want to see what I am doing wrong in my withFrame call.



 def "Write and Post a Small Comment" () 
when:
MyBlogSpot bs = to MyBlogSpot
then:
bs.readMoreLink.click()

withFrame("comment-editor") // <---- this is the line 16 in the error statement
$('#commentBodyField') << "my text"
$("button", name:"postCommentSubmit").click()





The above is the spec.



The element I am trying to reach is:



<iframe allowtransparency="true" class="blogger- iframe-colorize blogger-comment-from-post" frameborder="0" height="194px" id="comment-editor" name="comment-editor" src="https://www.blogger.com/comment-iframe.g?blogID=3577645066754224503&amp;postID=6815587395142211832&amp;blogspotRpcToken=2994523#%7B%22color%22%3A%22rgb(34%2C%2034%2C%2034)%22%2C%22backgroundColor%22%3A%22rgb(255%2C%20255%2C%20255)%22%2C%22unvisitedLinkColor%22%3A%22rgb(204%2C%20102%2C%2017)%22%2C%22fontFamily%22%3A%22Arial%2C%20Tahoma%2C%20Helvetica%2C%20FreeSans%2C%20sans-serif%22%7D" width="100%" data-resized="true"></iframe>


No matter what arguments I use for withFrame - even if I use withFrame(2) after checking the browser debugger tool - the error I get when running the test is:



at CommentSpec.Write and Post a Small 
Comment(CommentSpec.groovy:17)
Caused by:
org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value'
(Session info: chrome=70.0.3538.77)
(Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z'
System info: host: 'GUY-HP', ip: '192.168.1.2', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_161'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [mobileEmulationEnabled=false, hasTouchScreen=false, platform=XP, acceptSslCerts=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=XP, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome=chromedriverVersion=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a), userDataDir=C:UsersGuyAppDataLocalTempscoped_dir12868_17851, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=70.0.3538.77, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true]
Session ID: da4a617e55935af5a32b5c7c17213231
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:586)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.frame(RemoteWebDriver.java:912)
at geb.frame.DefaultFrameSupport.executeWithFrame(DefaultFrameSupport.groovy:57)
at geb.frame.DefaultFrameSupport.withFrame(DefaultFrameSupport.groovy:36)
at geb.Page.withFrame(Page.groovy:120)
at geb.Browser.methodMissing(Browser.groovy:217)
at geb.spock.GebSpec.methodMissing(GebSpec.groovy:60)
... 1 more


If there is any other code I need to paste in, please let me know. TIA!










share|improve this question

























    up vote
    1
    down vote

    favorite












    I'm new to using withFrames in Geb, and I am trying to follow the examples in the Book of Geb.



    I am trying to get my code to enter text and push a button within a frame.



    The preferred way is to define the frame element inside your containing page, but for now I just want to see what I am doing wrong in my withFrame call.



     def "Write and Post a Small Comment" () 
    when:
    MyBlogSpot bs = to MyBlogSpot
    then:
    bs.readMoreLink.click()

    withFrame("comment-editor") // <---- this is the line 16 in the error statement
    $('#commentBodyField') << "my text"
    $("button", name:"postCommentSubmit").click()





    The above is the spec.



    The element I am trying to reach is:



    <iframe allowtransparency="true" class="blogger- iframe-colorize blogger-comment-from-post" frameborder="0" height="194px" id="comment-editor" name="comment-editor" src="https://www.blogger.com/comment-iframe.g?blogID=3577645066754224503&amp;postID=6815587395142211832&amp;blogspotRpcToken=2994523#%7B%22color%22%3A%22rgb(34%2C%2034%2C%2034)%22%2C%22backgroundColor%22%3A%22rgb(255%2C%20255%2C%20255)%22%2C%22unvisitedLinkColor%22%3A%22rgb(204%2C%20102%2C%2017)%22%2C%22fontFamily%22%3A%22Arial%2C%20Tahoma%2C%20Helvetica%2C%20FreeSans%2C%20sans-serif%22%7D" width="100%" data-resized="true"></iframe>


    No matter what arguments I use for withFrame - even if I use withFrame(2) after checking the browser debugger tool - the error I get when running the test is:



    at CommentSpec.Write and Post a Small 
    Comment(CommentSpec.groovy:17)
    Caused by:
    org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value'
    (Session info: chrome=70.0.3538.77)
    (Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 0 milliseconds
    Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z'
    System info: host: 'GUY-HP', ip: '192.168.1.2', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_161'
    Driver info: org.openqa.selenium.chrome.ChromeDriver
    Capabilities [mobileEmulationEnabled=false, hasTouchScreen=false, platform=XP, acceptSslCerts=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=XP, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome=chromedriverVersion=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a), userDataDir=C:UsersGuyAppDataLocalTempscoped_dir12868_17851, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=70.0.3538.77, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true]
    Session ID: da4a617e55935af5a32b5c7c17213231
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
    at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
    at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
    at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:586)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.frame(RemoteWebDriver.java:912)
    at geb.frame.DefaultFrameSupport.executeWithFrame(DefaultFrameSupport.groovy:57)
    at geb.frame.DefaultFrameSupport.withFrame(DefaultFrameSupport.groovy:36)
    at geb.Page.withFrame(Page.groovy:120)
    at geb.Browser.methodMissing(Browser.groovy:217)
    at geb.spock.GebSpec.methodMissing(GebSpec.groovy:60)
    ... 1 more


    If there is any other code I need to paste in, please let me know. TIA!










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I'm new to using withFrames in Geb, and I am trying to follow the examples in the Book of Geb.



      I am trying to get my code to enter text and push a button within a frame.



      The preferred way is to define the frame element inside your containing page, but for now I just want to see what I am doing wrong in my withFrame call.



       def "Write and Post a Small Comment" () 
      when:
      MyBlogSpot bs = to MyBlogSpot
      then:
      bs.readMoreLink.click()

      withFrame("comment-editor") // <---- this is the line 16 in the error statement
      $('#commentBodyField') << "my text"
      $("button", name:"postCommentSubmit").click()





      The above is the spec.



      The element I am trying to reach is:



      <iframe allowtransparency="true" class="blogger- iframe-colorize blogger-comment-from-post" frameborder="0" height="194px" id="comment-editor" name="comment-editor" src="https://www.blogger.com/comment-iframe.g?blogID=3577645066754224503&amp;postID=6815587395142211832&amp;blogspotRpcToken=2994523#%7B%22color%22%3A%22rgb(34%2C%2034%2C%2034)%22%2C%22backgroundColor%22%3A%22rgb(255%2C%20255%2C%20255)%22%2C%22unvisitedLinkColor%22%3A%22rgb(204%2C%20102%2C%2017)%22%2C%22fontFamily%22%3A%22Arial%2C%20Tahoma%2C%20Helvetica%2C%20FreeSans%2C%20sans-serif%22%7D" width="100%" data-resized="true"></iframe>


      No matter what arguments I use for withFrame - even if I use withFrame(2) after checking the browser debugger tool - the error I get when running the test is:



      at CommentSpec.Write and Post a Small 
      Comment(CommentSpec.groovy:17)
      Caused by:
      org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value'
      (Session info: chrome=70.0.3538.77)
      (Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
      Command duration or timeout: 0 milliseconds
      Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z'
      System info: host: 'GUY-HP', ip: '192.168.1.2', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_161'
      Driver info: org.openqa.selenium.chrome.ChromeDriver
      Capabilities [mobileEmulationEnabled=false, hasTouchScreen=false, platform=XP, acceptSslCerts=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=XP, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome=chromedriverVersion=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a), userDataDir=C:UsersGuyAppDataLocalTempscoped_dir12868_17851, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=70.0.3538.77, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true]
      Session ID: da4a617e55935af5a32b5c7c17213231
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
      at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
      at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
      at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:586)
      at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.frame(RemoteWebDriver.java:912)
      at geb.frame.DefaultFrameSupport.executeWithFrame(DefaultFrameSupport.groovy:57)
      at geb.frame.DefaultFrameSupport.withFrame(DefaultFrameSupport.groovy:36)
      at geb.Page.withFrame(Page.groovy:120)
      at geb.Browser.methodMissing(Browser.groovy:217)
      at geb.spock.GebSpec.methodMissing(GebSpec.groovy:60)
      ... 1 more


      If there is any other code I need to paste in, please let me know. TIA!










      share|improve this question













      I'm new to using withFrames in Geb, and I am trying to follow the examples in the Book of Geb.



      I am trying to get my code to enter text and push a button within a frame.



      The preferred way is to define the frame element inside your containing page, but for now I just want to see what I am doing wrong in my withFrame call.



       def "Write and Post a Small Comment" () 
      when:
      MyBlogSpot bs = to MyBlogSpot
      then:
      bs.readMoreLink.click()

      withFrame("comment-editor") // <---- this is the line 16 in the error statement
      $('#commentBodyField') << "my text"
      $("button", name:"postCommentSubmit").click()





      The above is the spec.



      The element I am trying to reach is:



      <iframe allowtransparency="true" class="blogger- iframe-colorize blogger-comment-from-post" frameborder="0" height="194px" id="comment-editor" name="comment-editor" src="https://www.blogger.com/comment-iframe.g?blogID=3577645066754224503&amp;postID=6815587395142211832&amp;blogspotRpcToken=2994523#%7B%22color%22%3A%22rgb(34%2C%2034%2C%2034)%22%2C%22backgroundColor%22%3A%22rgb(255%2C%20255%2C%20255)%22%2C%22unvisitedLinkColor%22%3A%22rgb(204%2C%20102%2C%2017)%22%2C%22fontFamily%22%3A%22Arial%2C%20Tahoma%2C%20Helvetica%2C%20FreeSans%2C%20sans-serif%22%7D" width="100%" data-resized="true"></iframe>


      No matter what arguments I use for withFrame - even if I use withFrame(2) after checking the browser debugger tool - the error I get when running the test is:



      at CommentSpec.Write and Post a Small 
      Comment(CommentSpec.groovy:17)
      Caused by:
      org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value'
      (Session info: chrome=70.0.3538.77)
      (Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
      Command duration or timeout: 0 milliseconds
      Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z'
      System info: host: 'GUY-HP', ip: '192.168.1.2', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_161'
      Driver info: org.openqa.selenium.chrome.ChromeDriver
      Capabilities [mobileEmulationEnabled=false, hasTouchScreen=false, platform=XP, acceptSslCerts=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=XP, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome=chromedriverVersion=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a), userDataDir=C:UsersGuyAppDataLocalTempscoped_dir12868_17851, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=70.0.3538.77, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true]
      Session ID: da4a617e55935af5a32b5c7c17213231
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
      at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
      at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
      at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:586)
      at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.frame(RemoteWebDriver.java:912)
      at geb.frame.DefaultFrameSupport.executeWithFrame(DefaultFrameSupport.groovy:57)
      at geb.frame.DefaultFrameSupport.withFrame(DefaultFrameSupport.groovy:36)
      at geb.Page.withFrame(Page.groovy:120)
      at geb.Browser.methodMissing(Browser.groovy:217)
      at geb.spock.GebSpec.methodMissing(GebSpec.groovy:60)
      ... 1 more


      If there is any other code I need to paste in, please let me know. TIA!







      iframe frames geb






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 11 at 3:31









      Guy

      206




      206






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          This looks like a problem with version compatibility between the binaries.



          The error shows your are using



          chrome=70.0.3538.77
          Driver info: chromedriver=2.32.498550


          You want to download the latest chromedriver 2.43 which works with your version of Chrome. See here for compatible versions: Chrome Drivers






          share|improve this answer




















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245605%2fgeb-withframe-call-function-result-missing-value%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            This looks like a problem with version compatibility between the binaries.



            The error shows your are using



            chrome=70.0.3538.77
            Driver info: chromedriver=2.32.498550


            You want to download the latest chromedriver 2.43 which works with your version of Chrome. See here for compatible versions: Chrome Drivers






            share|improve this answer
























              up vote
              0
              down vote



              accepted










              This looks like a problem with version compatibility between the binaries.



              The error shows your are using



              chrome=70.0.3538.77
              Driver info: chromedriver=2.32.498550


              You want to download the latest chromedriver 2.43 which works with your version of Chrome. See here for compatible versions: Chrome Drivers






              share|improve this answer






















                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                This looks like a problem with version compatibility between the binaries.



                The error shows your are using



                chrome=70.0.3538.77
                Driver info: chromedriver=2.32.498550


                You want to download the latest chromedriver 2.43 which works with your version of Chrome. See here for compatible versions: Chrome Drivers






                share|improve this answer












                This looks like a problem with version compatibility between the binaries.



                The error shows your are using



                chrome=70.0.3538.77
                Driver info: chromedriver=2.32.498550


                You want to download the latest chromedriver 2.43 which works with your version of Chrome. See here for compatible versions: Chrome Drivers







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 12 at 9:57









                Rushby

                679716




                679716



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245605%2fgeb-withframe-call-function-result-missing-value%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    這個網誌中的熱門文章

                    What does pagestruct do in Eviews?

                    Dutch intervention in Lombok and Karangasem

                    Channel Islands