Why the cypress click not working with ionic (tap) event - ionic2

I am not able to actual click and trigger the event by .click() of cypress if my html element is having (tap) event which I have included for ionic
HTML
< img data-cy="submit-env" tabindex="0" (tap)="secretTap()">
Cypress
cy.get('[data-cy=submit-env]')
.click()
It's not working as expect It's working when I change (tap) with (click) like
< img data-cy="submit-env" tabindex="0" (click)="secretTap()">

Related

Google reCaptcha not working on bootstrap modal popup

Hi i have added the google reCaptcha in the bootstrap modal i am using same key on the index page and on the modal which opens after button click on the index ,on page it is working fine but on modal popup it is showing error "ERROR for site owner:
Invalid domain for site key"
I have added the screenshot
Try to enqueue recaptcha script or add it to the footer like this
<script type=’text/javascript’ src=’https://www.google.com/recaptcha/api.js?;ver=2.0′></script>

Submit button is not clicking even though python script is executed-Python Selenium

In my testing, one of the page is having "Submit" button and when i try to click on submit button is not working (not clicking) even though script is executed.
Below is the HTML code for the submit button
<button class="btn btn-primary" name="submit_button" value="1" type="submit">
<i class="fa fa-check"></i>
Submit
I have written the scripts as like below to find submit button element.
time.sleep(6)
sub = web.find_element_by_name("submit_button")
sub.click()
I have tried to find element using "Xpath" (Absolute XPath and Relative XPath) as well and observed that did not work. one more thing is that,the accessible page is in "iframe"
and i have access that as like below
web.switch_to.frame("page-content")
To confirm that whether the scripts is running or not i have modified above code as like below.
time.sleep(6)
print ("hello")
sub = web.find_element_by_name("submit_button")
print ("hello1")
sub.click()
print ("hello2")
From above code i got know that scripts were executing successfully
Please guide me what is the issue?
Answers are much appreciable!

Ionic 3 ion-input captures focus of the whole row in Android

This ionic page is just a form with some elements. In the Phone field, I have created a modal that opens when you click on an image:
<ion-grid>
<ion-row>
<ion-col>
<form #registerForm="ngForm" novalidate [formGroup]="form">
[...]
<ion-item>
<img item-left margin-left src={{flagPath}} (click)="presentCountryModal()">
<p item-left (click)="presentCountryModal()">+{{countryCode}}</p>
<ion-icon item-left name="arrow-dropdown" (click)="presentCountryModal()">
</ion-icon>
<ion-input
placeholder="Phone"
type="text"
[(ngModel)]="account.phone"
name="phone"
required
pattern=".{8,}"
#phone="ngModel"
></ion-input>
</ion-item>
It works perfectly on iOS and Windows on ionic-lab. But in Android the behavior is different: when I click on the image, the Phone ion-input gets the focus and the whole form moves up, making space for the keyboard and hiding the field under the header.
I'd like to:
1) Be able to make the image clickable.
2) Disable the automatic scrolling when an ion-input gets focused. I've tried keyboard.disableScroll(true) with no success.
Any ideas? Thanks!
UPDATE:
As explained here, adding .input-cover { position: static; } to the scss files stabilizes the form and makes the image click event responsive! So that solves the first question.
But I still have the problem that, when the keyboard opens, the whole page moves up and the top elements hide below the header (and you can't scroll them down).
1) You need to make a separated ion-item form the img. If you have an ion-input inside an ion-item, everything you put together will be "part" of that input.
2) The easiest way to do this without manipulating via ts is using a regular input, not the ion-input or using the ion-input inside a div instead of the ion-item. The second one i'm just guesing, since the behaviour of the scroll for showing the keyboard happens if you have an ion-input inside ion-item.
Hope this helps :)

How to add user defined icons in Ionic2?

I am a newbie to Ionic 2 and I want to use my own icons/image slices (like those i place in drawable folders in native android). Like in the list view I want to add an icon along with some text. I can found such examples nowhere. Any help would highly be appreciated.
Following will be your Css file
.icon{
background-image: url("../assets/icons/ic_icon.png");
background-repeat:no-repeat;
}
Ionic 2 HTML code
<button ion-button color="secondary" clear>
<div class="icon">
<p>Icon</p>
</div>
</button>
This will work for you , in ionic 2, button tag is optional , it's there to add the tap effect
try icomoon service, which provides css files and fonts that easy include in project

How to make Scrollable List area in a specific div in body (Onsen-UI)

I am making phonegap application using Onsen-UI. In that,I made a signup page. Now whenever I am trying to scroll the screen, whole body of page is scrolling. I want a particular division in a body that should scroll only. I have app Logo above the signup page and Logo is in the body part. So that shouldn't be scrolled. Only List div should be scrolled.
You can try using the <ons-scroller> directive:
<ons-scroller style="height: 200px">
<p>I am scrollable</p>
</ons-scroller>
I made a simple example: http://codepen.io/argelius/pen/dPeKOB
This option works to me:
<ons-page>
Toolbar here
<div class="background"></div>
<div class="content">
Scrollable content here
</div>
Fixed content here
</ons-page>
from: https://onsen.io/v2/api/js/ons-page.html