Untitled

 avatar
unknown
plain_text
2 years ago
4.2 kB
5
Indexable
.c-checkout-payment>div[class^="c-checkout-review"] {
  display : flex;
  flex-direction : column;
}

.c-checkout-payment>div[class^="c-checkout-review"]>div:nth-child(3) {
  order : -1;
}

.c-checkout-payment>div[class^="c-checkout-review"]>div:nth-child(3) label[for="radio-button-mobilepay"] {
  display : flex;
  align-items : center;
  justify-content : space-between;
}

.c-checkout-payment>div[class^="c-checkout-review"]>div:nth-child(3) label[for="radio-button-mobilepay"]::after {
  content : "";
  display : inline-block;
  background-image : url("https://expogrowth.in/wp-content/uploads/2022/12/mobilepay.svg");
  background-attachment : initial;
  background-origin : initial;
  background-clip : initial;
  background-color : initial;
  width : 50px;
  background-repeat : no-repeat no-repeat;
  background-size : cover;
  background-position : center center;
  height : 38px;
}

.c-checkout-payment>div[class^="c-checkout-review"]>div:nth-child(3) label[for="radio-button-mobilepay"] .radio-button-icon {
  top : calc((1.448em - 2px) / 2) !important;
}


(function() {
    try {
        /* main variables */
        var debug = 0;
        var variation_name = "";
        var $;
        /* all Pure helper functions */

        function waitForElement(selector, trigger, delayInterval, delayTimeout) {
            var interval = setInterval(function() {
                if (
                    document &&
                    document.querySelector(selector) &&
                    document.querySelectorAll(selector).length > 0
                ) {
                    clearInterval(interval);
                    trigger();
                }
            }, delayInterval);
            setTimeout(function() {
                clearInterval(interval);
            }, delayTimeout);
        }

        function live(selector, event, callback, context) {
            /****Helper Functions****/
            // helper for enabling IE 8 event bindings
            function addEvent(el, type, handler) {
                if (el.attachEvent) el.attachEvent("on" + type, handler);
                else el.addEventListener(type, handler);
            }
            // matches polyfill
            this.Element &&
                (function(ElementPrototype) {
                    ElementPrototype.matches =
                        ElementPrototype.matches ||
                        ElementPrototype.matchesSelector ||
                        ElementPrototype.webkitMatchesSelector ||
                        ElementPrototype.msMatchesSelector ||
                        function(selector) {
                            var node = this,
                                nodes = (node.parentNode || node.document).querySelectorAll(selector),
                                i = -1;
                            while (nodes[++i] && nodes[i] != node);
                            return !!nodes[i];
                        };
                })(Element.prototype);
            // live binding helper using matchesSelector
            function live(selector, event, callback, context) {
                addEvent(context || document, event, function(e) {
                    var found,
                        el = e.target || e.srcElement;
                    while (el && el.matches && el !== context && !(found = el.matches(selector))) el = el.parentElement;
                    if (found) callback.call(el, e);
                });
            }
            live(selector, event, callback, context);
        }

        live('.btn-checkout-continue', 'click', function() {
            waitForElement("div[class^='c-checkout-review'] label[for=radio-button-mobilepay]",init,50,15000);
       });


        /* Variation Init */
        function init() {
          setTimeout(function(){
 /* start your code here */
            document.querySelector("div[class^='c-checkout-review'] label[for=radio-button-mobilepay]").click();
},1000);
           
        }

        /* Initialize variation */
        waitForElement("div[class^='c-checkout-review'] label[for=radio-button-mobilepay]", init, 50, 15000);
    } catch (e) {
        if (debug) console.log(e, "error in Test" + variation_name);
    }
})();
Editor is loading...