Giter Site home page Giter Site logo

Bug - frame msg_body about tagui HOT 5 CLOSED

aisingapore avatar aisingapore commented on May 18, 2024
Bug - frame msg_body

from tagui.

Comments (5)

thim81 avatar thim81 commented on May 18, 2024

Here is the source code of the page with the iframe

`

   
   
   
   
   
   
   
   
   
 
 
 
  <title>Mailinator</title>
 
 
 
 
 
   
 
   
 
 
 
 
 
 
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
   
 
  <!--[if lt IE 9]>
  <script src="/js/html5shiv.js"></script>
  <script src="/js/respond.min.js"></script>
  <![endif]-->
   
  <script src="/js/html-css-sanitizer-minified.js"></script>
   
 
   
 
  <title>Mailinator</title>
 
 
 
 
 
 
 
 
 
   
  <script src="/manyauth/js/manyauthutils.js"></script>
   
 
  <body data-spy="scroll" data-target="nav"
  style="font-family:'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif" ng-controller="InboxCtrl"
  id="InboxCtrl">
   
   
   
   
 
 
 
 
 
   
 
 
 
   
  <div class="header_logo_text" style="cursor:pointer;float:left;font-weight: bold;color:white;"
  onclick="window.location='/'">
  MAILINATOR
 
 
   
 
  Sign up
 
 
  Log in
 
 
 
 
 
  Upgrade
  FAQ
  API
 
 
 
   
 
 
  <input type="text" placeholder="Enter Inbox" class="lb-input"
  onkeydown="if (event.keyCode == 13) { subInboxSameZone($('#inbox_field_mob').val()); $('#inbox_field_mob').blur(); return false; }"
  id="inbox_field_mob"/>
  <span id='inbox_button_mob' class="lb-btn"
  onclick="subInboxSameZone($('#inbox_field_mob').val()); $('#inbox_field_mob').blur(); return false;">
 
 
 
 
  <div id="activity_light" style="float:left;padding-top: 8px;"
  title="Mailinator Stream Connection Status">
 
 
  <div id="pause_icon"
  onclick="userPauseStream()"
  style="float:left;margin-left: 5px;padding-top: 8px;" title="Pause incoming emails">
 
 
 
 
  privacy-level:
 
 
  {{visibility}}
 
 
  query:
 
 
  {{original_query}}
 
 
  <div id="pin_inbox_icon"
  onclick="pinInbox();"
  style="float:left;margin-left: 3px;padding-top:5px;cursor: pointer;display: {{save_eligible}}"
  title="Save this Query">
 
 
   
 
 
 
  <span class="fa-stack fa-manylarge" title="Delete Emails"
  onclick="trashEmails();"
  style="cursor: pointer">
 
 
 
  <span class="fa-stack fa-manylarge"
   
  title="Login to Save Emails"
   
  style="cursor: pointer">
 
 
 
  <span class="fa-stack fa-manylarge"
   
  title="Login to Forward Emails"
   
  style="cursor: pointer;">
 
 
 
 
   
 
 
   
   
  <script type="text/javascript">
  function updateLinks(tree) {
   
  tree.find('a').each(function () {
  var href = $(this).attr('href');
  if (href && href.length > 0) {
  if (href.indexOf('mailinator') > 0 || href.indexOf("clickrouter") > 0 || href == "/" ||
  href.indexOf("stripe") > 0) {
   
  } else {
  //console.log(href);
  href = escape(href);
  href = "http://click1.clickrouter.com/redirect?token=a2258079c24c4c50a56b6b1ffb75d6e2&" +
  "url=" + href;
  $(this).attr('href', href);
  }
  }
  });
   
  }
   
  var manyuser = false;
   
  var muValidated = false;
   
   
   
   
  var manyteam = false;
   
   
  </script>
   
 
 
 
 
   
 
  <input type="text" placeholder="Enter Inbox" class="lb-input"
  onkeydown="if (event.keyCode == 13) { subInboxSameZone($('#inbox_field').val()); return false; }"
  id="inbox_field"
  />
  <span id='inbox_button' class="lb-btn"
  onclick="subInboxSameZone($('#inbox_field').val()); return false;">
 
 
 
 
   
 
   
   
 
      <li ng-repeat="status in status_list"
      class="lb_all_item">
      <p class="lb_all-text {{status.active}}" id='bigrow_{{status.status_zone}}'
      onclick="itemInboxClick('{{status.status_zone}}')">
      {{status.title}}{{status.count}}

     
        <li ng-repeat="query in status.query_list"
        class="lb_all_sub-item {{query.active}}"
        onclick="subItemInboxClick('{{query.zone}}', '{{query.text}}')">
       
        {{query.pretty}}
        <div style="min-width: 2.4rem;float:right;text-align: right;"
        onclick="unpinInbox('{{query.zone}}', '{{query.text}}', '{{query.saved}}');if(event.stopPropagation){event.stopPropagation();}event.cancelBubble=true;"
        title="Delete Saved Query">
        <i class="fa fa-close"
        style="display:{{query.saved}};cursor: pointer;margin-left: 3px;color:#aaa;">
         
       
       
        {{query.count}}
       
       
       

       
       
       
       
         
       
         
         
       
       
       
         
       
        Mailinator Blog:
        Introducing the Mailinator Realtime Inbox !
       
         
       
        Need your own Private Mailinator?
        Upgrade Now
       
         
       
        <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
       
        <ins class="adsbygoogle"
        style="display:inline-block;width:160px;height:600px"
        data-ad-client="ca-pub-8366735459736268"
        data-ad-slot="8480074758">
        <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
        </script>
       
         
       
        Links monetized by ClickRouter
       
         
         
         
         
       
       
       
       
       
       
       
        {{msg.subject}}
       
       
         
       
       
        {{msg.received}}
         
         
         
         
       
       
       
       
       
       
       
         
        <iframe id="msg_body" style="border: 0;overflow: hidden;"
        width="100%"
        height="100%"
        name="msg_body" marginheight="0">
        EMAIL BODY
        </iframe>
         
       
        <div id='publicm8rguy'
        style="display:none;text-align:center;background-color:#fff;font-size:18px;padding-top: 40px;">
       
       
        [ This Inbox channel is currently Empty ]
       
       
       
       
         
       
          <li class="all_message-item all_message-item-parent cf"
          ng-repeat="email in emails" id="row_{{email.id}}"
           
          onclick="showTheMessage('{{email.id}}');">
           
         
          <div class="all_message-min-check-container"
          id='check_{{email.id}}'
          onclick="checkBox('{{email.id}}');if(event.stopPropagation){event.stopPropagation();}event.cancelBubble=true;">
          <i class="fa fa-check-square fa-lg" style="display:none;color#aaa;"
          id="checkon_{{email.id}}">
         
         
         
          {{email.to}}
         
         
        {{email.from}}
         
        {{email.subject}}
         
        {{email.humandate}}
         
         
         
         
           
         
         
           
          <script src="js/jquery.selectric.js"></script>
          <script src="js/script.js"></script>
           
          <script src="../js/angular.min.js"></script>
           
          <script type="text/javascript" src='../assets/js/jquery.timeago.js'></script>
          <script type="text/javascript" src='../assets/js/jquery.address.js'></script>
          <script type="text/javascript" src="js/m8r.js?887"></script>
           
         
         
         
          PRICING
         
         
         
         
          FAQ
         
         
         
         
          API DOCS
         
         
         
         
          BLOG
         
         
         
         

        Copyright 2017 Manybrain, Inc. All Right Reserved. Terms and

          Conditions and Privacy Policy
           
           
           
            [email protected]<script data-cfhash='f9e31' type="text/javascript">/* */</script>
         

         
         
          <script type="text/javascript">
          /* When the user clicks on the button,
          toggle between hiding and showing the dropdown content */
          function gearClick() {
          document.getElementById("myDropdown").classList.toggle("show");
          }
           
          function otherMenuClick() {
          document.getElementById("other_menu").classList.toggle("show");
          }
           
          // Close the dropdown menu if the user clicks outside of it
          window.onclick = function (event) {
          if (!event.target.matches('.dropbtn')) {
           
          var dropdowns = document.getElementsByClassName("dropdown-content");
          var i;
          for (i = 0; i < dropdowns.length; i++) {
          var openDropdown = dropdowns[i];
          if (openDropdown.classList.contains('show')) {
          openDropdown.classList.remove('show');
          }
          }
          }
          }
          </script>
          <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
           
          ga('create', 'UA-170806-1', 'mailinator.com');
          ga('send', 'pageview');
           
          </script>
           
           
          <script type="text/javascript">
          adroll_adv_id = "VMN4XCGWCNE5PPIHTM52HX";
          adroll_pix_id = "AYN7TMHAPFAS5BJF723VO2";
          (function () {
          var oldonload = window.onload;
          window.onload = function(){
          __adroll_loaded=true;
          var scr = document.createElement("script");
          var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");
          scr.setAttribute('async', 'true');
          scr.type = "text/javascript";
          scr.src = host + "/j/roundtrip.js";
          ((document.getElementsByTagName('head') || [null])[0] ||
          document.getElementsByTagName('script')[0].parentNode).appendChild(scr);
          if(oldonload){oldonload()}};
          }());
          </script>
           
           
           
          <script>/* -1&&m>28){j=28+s;s='';if(j/g,'>');l[i].href='mailto:'+t.value}}catch(e){}}}catch(e){}})(document);/* ]]> */</script>
         
           

        `

        from tagui.

        kensoh avatar kensoh commented on May 18, 2024

        Hi @thim81 thanks for reporting this! If there is no sensitive info, can you paste the section of the generated CasperJS .js code around the frame handling here?

        It sounds like the generated CasperJS code is likely to be ok, otherwise there will be runtime JS error. The name of the frame also exists in the HTML DOM.

        But somehow the interaction broke somewhere along TagUI-CasperJS-SlimerJS-Firefox. Also, if you run using default mode (PhantomJS) without firefox option, and run with chrome option to run through Chrome, does the same error of hanging there happen? This info can help to isolate where is the cause of the execution hanging.

        from tagui.

        thim81 avatar thim81 commented on May 18, 2024

        Here is the flow

        http://www.mailinator.com/v2/inbox.jsp?zone=public
        
        // = MOCKING ========================================================= //
        
        // Mocking data
        data_test = "hyper.koopa.bowser"; 
        
        // = Mailinator ================================================================= //
        wait 3.0
        
        click inbox_field
        enter inbox_field as '+data_test+'
        click #inbox_button
        
        // Show success
        wait 3.0
        
        // Click register mail
        test.assertSelectorHasText(tx('body'), 'Register','Check if mail is send properly to '+data_test+'');
        click Register
        wait 3.0
        
        // Click confirmation link
        // JS this.page.switchToChildFrame(0); // this works but the causes the blank popup behaviour
        frame msg_body
        
        click Confirm email address // causes blank popup
        wait 6.0
        
        

        from tagui.

        kensoh avatar kensoh commented on May 18, 2024

        Running the flow with default option works. The generated .js code for frame handling is below and looks ok.

        casper.wait(3000, function() {
        // Click confirmation link
        // JS this.page.switchToChildFrame(0); // this works but the causes the blank popup behaviour
        {techo('frame msg_body');
        casper.withFrame('msg_body', function() {
        {techo('click Confirm email address // causes blank popup');
        casper.waitFor(function check() {return check_tx('Confirm email address // causes blank popup');},
        function then() {this.click(tx('Confirm email address // causes blank popup'));},
        function timeout() {this.echo('ERROR - cannot find Confirm email address // causes blank popup').exit();});} });} });

        Below is the automation result. Note that the // comment after click Confirm email address should be removed as TagUI will literally take it as part of the text string to look out for -

        START - automation started - Tue Aug 01 2017 00:53:54 GMT+0800 (+08)
        http://www.mailinator.com/v2/inbox.jsp?zone=public - Mailinator
        
        wait 3.0
        click inbox_field
        enter inbox_field as hyper.koopa.bowser
        click #inbox_button
        wait 3.0
        click Register
        wait 3.0
        frame msg_body
        click Confirm email address
        wait 6.0
        
        http://www.mailinator.com/v2/inbox.jsp?zone=public#/#msgpane - Mailinator
        FINISH - automation finished - 24.9s
        

        Running with Firefox options works for me as well until the part where the popup appears. Running with chrome without test option also works. Looks like there is difference is execution behavior between your system and mine. I'm running on macOS v10.12.6 and Firefox v53.0.2 (64-bit).

        You haven't share your chrome or default mode result, and I assume when you say it just wait means hang without any error message. It should throw error after default 10s timeout, even if the click has the extra // comment behind, and not just wait there.

        from tagui.

        thim81 avatar thim81 commented on May 18, 2024

        Indeed it works properly.

        Must be something else in my flow that causes the stopping.

        from tagui.

        Related Issues (20)

        Recommend Projects

        • React photo React

          A declarative, efficient, and flexible JavaScript library for building user interfaces.

        • Vue.js photo Vue.js

          🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

        • Typescript photo Typescript

          TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

        • TensorFlow photo TensorFlow

          An Open Source Machine Learning Framework for Everyone

        • Django photo Django

          The Web framework for perfectionists with deadlines.

        • D3 photo D3

          Bring data to life with SVG, Canvas and HTML. 📊📈🎉

        Recommend Topics

        • javascript

          JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

        • web

          Some thing interesting about web. New door for the world.

        • server

          A server is a program made to process requests and deliver data to clients.

        • Machine learning

          Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

        • Game

          Some thing interesting about game, make everyone happy.

        Recommend Org

        • Facebook photo Facebook

          We are working to build community through open source technology. NB: members must have two-factor auth.

        • Microsoft photo Microsoft

          Open source projects and samples from Microsoft.

        • Google photo Google

          Google ❤️ Open Source for everyone.

        • D3 photo D3

          Data-Driven Documents codes.