Ionic radio button not being Selected - node.js

I have two ionic checkbox I need to select the first one for the first time of visit the page, T have tried many but not being ..
<div class="row">
<div class="col col-50">
<ion-item>
<ion-label>{{opt1}}</ion-label>
<ion-radio value="{{opt1}}" checked="true"></ion-radio>
</ion-item>
</div>
<div class="col col-50">
<ion-item>
<ion-label>{{opt2}}</ion-label>
<ion-radio value="{{opt2}}" [disabled]="isDisabled"></ion-radio>
</ion-item>
</div>
</div>

Related

Modx GetImageList: Retrieve Every Other MIGX Entry

I am trying to have GetImageList retrieve every other/second entry in the MIGX tv. This way I can have two calls and split them up between two bootstrap columns. It just looks better that way. What parameters can I include in the snippet to do so?
[[getImageList?
&tvname=`Success Stories`
&tpl=`successtpl`
]]
Thanks!
I was able to use two getImageList calls, one in each column, each with a different conditional based on [[+_alt]]:
[[+_alt:is=`1`:then=`
<div class="col-md-12 col-sm-12 col-xs-12 cl-stacked-margin-bottom">
<div id="cl-tesimonial">
<div class="testimonial-content"><i class="fa fa-quote-left" aria-hidden="true"></i>
[[+client_testimony]]
<h2 class="cl-client-name">[[+client_name]]</h2>
<div class="cl-author image-testimonial"> <img src="[[+client_img:notempty=`[[+client_img]]`:else=`[[++assets_url]]img/client_images/testimonial.jpg" alt="[[+client_name]]">
</div>
</div>
</div>
</div>
`:else=``]]
and:
[[+_alt:is=`1`:then=``:else=`
<div class="col-md-12 col-sm-12 col-xs-12 cl-stacked-margin-bottom">
<div id="cl-tesimonial">
<div class="testimonial-content"><i class="fa fa-quote-left" aria-hidden="true"></i>
[[+client_testimony]]
<h2 class="cl-client-name">[[+client_name]]</h2>
<div class="cl-author image-testimonial"> <img src="[[+client_img:notempty=`[[+client_img]]`:else=`[[++assets_url]]img/client_images/testimonial.jpg" alt="[[+client_name]]">
</div>
</div>
</div>
</div>
`]]

Selenium "get elements inside another element" in nodejs

I'm trying to click in the third input box but I can't use a xpath [3] because it's isolated by divs. How can I get the third "div class price filter" and then get the input?
<div class="search-prices">
<div class="search-price-header">
<h1>Bid Price:</h1>
<button class="flat camel-case disabled" disabled="">Clear</button>
</div>
<div class="price-filter">
<div class="info"><span class="label">Min:</span></div>
<div class="ut-numeric-input-spinner-control">
<button class="btn-standard decrement-value disabled" disabled=""></button>
<input type="tel" class="numericInput" placeholder="Any">
<button class="btn-standard increment-value"></button></div>
</div>
<div class="price-filter">
<div class="info"><span class="label">Max:</span></div>
<div class="ut-numeric-input-spinner-control">
<button class="btn-standard decrement-value disabled" disabled=""></button>
<input type="tel" class="numericInput" placeholder="Any">
<button class="btn-standard increment-value"></button></div>
</div>
<div class="search-price-header">
<h1>Buy Now Price:</h1><button class="flat camel-case disabled" disabled="">Clear</button>
</div>
<div class="price-filter"></div>
<div class="info"><span class="label">Min:</span></div>
<div class="ut-numeric-input-spinner-control">
<button class="btn-standard decrement-value disabled"disabled=""></button>
<input type="tel" class="numericInput" placeholder="Any">
<button class="btn-standard increment-value"></button></div>
</div>
<div class="price-filter">
<div class="info"><span class="label">Max:</span></div>
<div class="ut-numeric-input-spinner-control">
<button class="btn-standard decrement-value disabled"disabled=""></button>
<input type="tel" class="numericInput" placeholder="Any">
<button class="btn-standard increment-value"></button>
</div>
</div>
</div>
I tried something like
var priceFilter = driver.findElement(By.xpath("//div[#class='price-filter'][3]"));
var numericInput = priceFilter.findElement(By.xpath("//input[#class='numericInput']"))
numericInput.click();
But my click always happens in the first input, any idea why?
Try this and let me know whether this works or not.
var numericInput =priceFilter.findElement(By.xpath("(//input[#class='numericInput'])[3]"))
numericInput.click();
Try this xpath: (//div[#class='price-filter']//input)[3]
The xpath that works for me is:
//div[#class='price-filter'][3]//input[#class='numericInput']
thank you guys!

How to click on outside of a div based on the value of inside value?

I want to click the class "include-icon" based on the user input. Check the below example:
<div class="item _ngcontent-EXCHANGE-80">
<div class="content _ngcontent-EXCHANGE-80">
<inventory-item class="_ngcontent-EXCHANGE-48 _nghost-EXCHANGE-81">
<div class="itemName _ngcontent-EXCHANGE-81">Option 1
</div>
</inventory-item>
</div>
<div class="selections _ngcontent-EXCHANGE-80">
<material-button animated="true" class="include-icon _ngcontent-EXCHANGE-80 _nghost-EXCHANGE-2"
icon="" tabindex="0" role="button" aria-disabled="false" elevation="4">
</material-button>
</div>
</div>
<div class="item _ngcontent-EXCHANGE-80">
<div class="content _ngcontent-EXCHANGE-80">
<inventory-item class="_ngcontent-EXCHANGE-48 _nghost-EXCHANGE-81">
<div class="itemName _ngcontent-EXCHANGE-81">Option 2
</div>
</inventory-item>
</div>
<div class="selections _ngcontent-EXCHANGE-80">
<material-button animated="true" class="include-icon _ngcontent-EXCHANGE-80 _nghost-EXCHANGE-2"
icon="" tabindex="0" role="button" aria-disabled="false" elevation="4">
</material-button>
</div>
</div>
<div class="item _ngcontent-EXCHANGE-80">
<div class="content _ngcontent-EXCHANGE-80">
<inventory-item class="_ngcontent-EXCHANGE-48 _nghost-EXCHANGE-81">
<div class="itemName _ngcontent-EXCHANGE-81">Option N
</div>
</inventory-item>
</div>
<div class="selections _ngcontent-EXCHANGE-80">
<material-button animated="true" class="include-icon _ngcontent-EXCHANGE-80 _nghost-EXCHANGE-2"
icon="" tabindex="0" role="button" aria-disabled="false" elevation="4">
</material-button>
</div>
</div>
So in the above example, there are three options: Option 1, Option 2 and Option N. If a user inputs Option 2, I want the puppeteer to click include-icon just below it and same for others.
Right now I am able to get the input from user and store it in a variable but not able to click on that specific class "include-icon"

content of ion-content go inside ion-header-bar

I am new to ionic framework. When I use ion-content like this
<ion-view>
<ion-header-bar class="bar bar-header bar-positive">
<div class="buttons">
<button class="button" ng-click="doSomething()">Left Button</button>
</div>
<h1 class="title">Title!</h1>
<div class="buttons">
<button class="button">Right Button</button>
</div>
</ion-header-bar>
<ion-content class="has-header">
<div class="row">
<div class="col">
<i class="fa fa-university"></i>
</div>
<div class="col">.col</div>
<div class="col">.col</div>
</div>
<div class="row">
<div class="col">.col</div>
<div class="col">.col</div>
<div class="col">.col</div>
</div>
</ion-content>
</ion-view>
First row go inside header bar. What's the problem?
I've used requirejs to load controller .
I didn't inject ionic module during bootstraping.
After inject ionic in module this problem solved.

Foundation: How to stack columns in responsive layout?

Trying to figure out how to a do a responsive layout using Foundation. I am new to this and familiar with the ability to use push and pull but I am struggling trying to figure out how to stack items in a single row.
Visual: http://i.imgur.com/q1LAvIa.png
<div class="row">
<div class="small-12 large-? columns"> A </div>
<div class="small-12 large-? columns"> B </div>
<div class="small-12 large-? columns"> C </div>
</div>
Thanks in advance!
i think your code (according to your image) would be like:
<div class="row">
<div class="small-12 large-6 large-push-6 columns">A</div>
<div class="row">
<div class="small-12 large-6 large-pull-6 columns">B</div>
<div class="small-12 large-6 columns">C</div>
</div>
</div>
</div>
You could check "Advanced" & "Source Ordering" sections in http://foundation.zurb.com/docs/components/grid.html

Resources