laravel 5.4 chrome for android not showing validation errors - android

I have a website working perfectly on desktop, however, google chrome is not showing validation error messages or flash info.
I tried other navigators like html source code viewer: worked perfectly
on chrome for desktop, everything is ok
when I serve my project from my computer and access it throgh wifi, it works perfectly
My server is running nginx on linux debian
The problem is, this only happens on my signin/signup page, other pages are showing errors and flash messages perfectly even on chrome for android
here is my view:
<h3>Welcome back</h3>
<div class="row">
<div class="col-lg-6">
<form class="form-vertical" role="form" method="post" action="{{ route('auth.signin') }}">
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email" class="control-label" id="email">Email</label>
<input type="text" name="email" class="form-control" id="email">
#if ($errors->has('email'))
<span class="help-block">{{ $errors->first('email') }}</span>
#endif
</div>
<div class="form-group{{ $errors->has('password') ? ' has- error' : '' }}">
<label for="password" class="control- label">Password</label>
<input type="password" name="password" class="form- control" id="password">
#if ($errors->has('password'))
<span class="help-block">{{ $errors- >first('password') }}</span>
#endif
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="remember"> Remember me
</label>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Sign in</button>
<a style="padding-left: 10px;" href="{{ route('auth.forgot') }}">Frogot your password?</a>
</div>
<input type="hidden" name="_token" value="{{ Session::token() }}">
</form>
</div>
</div>
<script>
(please don't mind the spaces in the code, I don't have these in my page)
inside my controller, I have this:
$this->validate($request, [
'email' => 'required',
'password' => 'required',
]);
and I show flash messages this way:
return redirect()->back()->with('info', 'Incorrect sign in information.');
can you please help me out? this is really weird and frustrating
thank you

Haser!
I have the same problem on the test server, but the production is ok.
Having studied all the circumstances, I am inclined to believe that in my case the problem lies in the absence of https on the test server.
My logic is this: mobile chrome sees the password entry field and sees that there is no certificate. These two circumstances come to non-standard behavior. Indirectly, I managed to confirm my theory by studying the password change page, there is the same situation with the absence of errors.
This behavior is observed only in mobile chrome on android!

Related

Cannot use click() in Selenium with mobile emulated chromedriver

I'm trying to test the login process of an internal web application using a mobile emulated chrome browser. I am using Python 3.6.4.
It finds the element by name, but won't click it!
Here is my code:
from selenium import webdriver
enter code herefrom selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
import time
mobile_emulation = {
"deviceMetrics": { "width": 360, "height": 640, "pixelRatio": 3.0 },
"userAgent": "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19" }
chrome_options = Options()
chrome_options.add_experimental_option("mobileEmulation", mobile_emulation)
driver = webdriver.Chrome(chrome_options = chrome_options)
driver.get("https://internalweburlhere")
elem = driver.find_element_by_id("txtEmailAddress")
elem.clear()
elem.send_keys("Username")
elem = driver.find_element_by_id("txtPassword")
elem.send_keys("1234")
print("Password Entered")
driver.find_element_by_id("btnSignIn").click()
print("Logged In")
Here is the website source:
<div id="divSignIn" class="login-content-sign-in" style="display:block;">
<div id="divSignInHeader" class="login-content-header text-bold-10 label-colour" MandatoryField="False">Sign in using your Portal account</div>
<div id="divSignInMessage" class="login-content-sign-in-message success-label-colour text-bold-9" MandatoryField="False" style="DISPLAY:none;">Your account email address has now been verified, please enter your password and sign in</div>
<div id="upSignIn">
<div id="divSignInEmailAddress">
<div id="lblEmailAddress" class="entry-label">Enter your email address</div>
<div>
<input name="txtEmailAddress" type="email" id="txtEmailAddress" aria-autocomplete="none" autocomplete="off" maxlength="50" class="login-content-email-address entry-control entry-control-colour entry-control-border text-9" onkeyup="checkSignInButton()" />
</div>
</div>
<div id="divPassword">
<div id="lblPassword" class="entry-label" MandatoryField="False">Enter your password</div>
<div>
<input name="txtPassword" type="password" id="txtPassword" aria-autocomplete="none" autocomplete="off" class="login-content-password entry-control entry-control-colour entry-control-border text-9" onkeypress="checkCapsLockStatus(event,'divSignInCapsLock')" onblur="hideCapsLockStatus('divSignInCapsLock')" onkeyup="checkSignInButton()" />
<div id="divSignInCapsLock" class="login-caps-lock-status">
<div id="divCapsLockDetail">
<img src="/Portal_Benchmark/Static/5.8.0.192/Images/dlg_icon_Exclamation.png" class="login-caps-lock-image" />
<span id="lblCapsLockMessage" class="login-caps-lock-message text-8" MandatoryField="False">Caps Lock Is On</span>
</div>
</div>
</div>
</div>
<div id="divSignInCaptcha" class="login-content-sign-in-captcha">
<div id="lblSignInCaptcha" class="entry-label">Enter the captcha text shown below </div>
<input type="hidden" id="objSignInCaptcha_clientState" name="objSignInCaptcha_clientState" /><div id="objSignInCaptcha" class="ig_Control igc_Control"><div class="igc_CaptchaImageArea"><img src="WebCaptchaImage.axd?guid=588a4174-70ca-4bf6-ac10-7ac77f74e6a4" title="" alt="" height="60" width="175" class="igc_CaptchaImage" /><input type="hidden" id="objSignInCaptcha__SignInEditor_clientState" name="objSignInCaptcha__SignInEditor_clientState" /><input title="{0}" id="objSignInCaptcha__SignInEditor" aria-autocomplete="none" autocomplete="off" onkeyup="checkSignInButton()" readonly="readonly" name="objSignInCaptcha__SignInEditor" maxlength="8" class="igc_CaptchaInput igte_Edit" type="text" style="width:175px;text-align:notset;" /></div><div class="igc_RefreshAndAudioButtonsArea"><img alt="Listen to Captcha Audio" id="x:1812979435.0:mkr:AudioButton" src="Static/5.8.0.192/PortalStyleSheets/Infragistics/Default/images/igc_AudioButton.gif" /><a id="x:1812979435.1:mkr:RefreshButtonLink" href="#"><img alt="Refresh Captcha Image" id="x:1812979435.2:mkr:RefreshButton" src="Static/5.8.0.192/PortalStyleSheets/Infragistics/Default/images/igc_RefreshButton.gif" /></a></div><div style="clear:left;"></div></div>
</div>
<div class="login-content-sign-in-panel">
<div id="lblError" class="login-content-sign-in-error warning-label-colour text-bold-9">
</div>
<div class="login-content-sign-in-button">
<input name="btnSignIn" type="submit" id="btnSignIn" disabled="disabled" value="Sign In" />
</div>
</div>
</div>
Can anybody suggest how I might get around this? Interestingly, when I run similar code at BrowserStack on an android chrome browser, the clicks work as intended. Just not when I run it locally.
Some time element present in DOM but selenium failed to wait until the attribute get removed . Possible guess is In your case it is not waiting for remove attribute disabled="disabled" from your input tag and performing the click, even you can't see any exception.
So in such case you have to inject javascript in your browser and perform the action as given below :
element = driver.find_element_by_id("btnSignIn")
driver.execute_script('arguments[0].click();', element)

Ionic 1 input get weird after special characters are introduced

Essentially, I don't have complex code but when using input fields in my Ionic 1 app there is an error that screws up the text in the field after I use anything that isn't alphanumeric. So typing in the email address 'o#o.com' (each letter chronologicaly) in a field displays like this:
o
o#
oo#
oo#.
oo#..
oo#..o
oo#..om
This is happening on an android device. I don't know whether or not it works on an ios device. It doesn't happen in an emulator or in ionic serve --lab. I've tested the ionic templates and it breaks with those projects too. So I don't think it matters what my specific code looks like but here it is:
<form ng-submit="doLogin()">
<div class="list">
<label class="item item-input">
<span class="input-label">Email</span>
<input type="text" ng-model="loginData.email">
</label>
<label class="item item-input">
<span class="input-label">Password</span>
<input type="text" ng-model="loginData.password">
</label>
<label class="item">
<button class="button button-block button-positive" type="submit">Log in</button>
</label>
</div>
</form>
I've recently started working in Ionic 2 in the last couple months, and don't know if that has had negative effects on Ionic 1 apps (I know they say it doesn't but this wasn't a problem in the past). What do you all think of this?
The problem sat for a while until I was forced to update my JDK and do some updates in Android SDK Manager. Then it seemed to work fine.

Can't preview Images on IonicView with Android

Well, I made an app using Ionic Creator, I added two images and finished my app, Iexported it out from ionic with "ionic start [appName] creator:[myappnumber]" and it did all fine.
I used ionic serve in terminal and it pops up a chrome window showing my app, in there the image is showing, but when I did ionic upload and downloaded files in my mobile with ionic view and then wanted to preview my app, the problem is there, the image isn't showing, I already tried with img src= and img ng-src but neither of them works.
<ion-view title="Title">
<ion-content padding="true" scroll="false" class="has-header">
<img ng-src="/img/r7qprdTRXqs2xOvgKLHI_3-logocolor.png" width="100%" height="auto" style="width: 100%; height: auto;">
<form class="list">
<ion-list>
<label class="item item-input">
<span class="input-label">Nombre</span>
<input type="text" placeholder="">
</label>
<label class="item item-input">
<span class="input-label">Usuario</span>
<input type="text" placeholder="">
</label>
<label class="item item-input">
<span class="input-label">Email</span>
<input type="email" placeholder="">
</label>
</ion-list>
Iniciar Encuesta
</form>
</ion-content>
Try to debug with using Chrome browser's DevTools. Type "chrome://inspect/#devices" in the url section after running the application on your device. Make sure your device is connected to your computer. Once the app runs, you will be able to see your device on the browser and check if images are loaded. It will be easy to debug. It will be either path issue or layout issue.

Android Chrome disable auto-suggest on search input form

I have the following search form:
<div id="search_banner">
<form id="intranet_search" class="search" action="<?=base_url()?>search/">
<div id="intranet_search_search_bar">
<input type="search" id="intranet_search_q" name="q" spellcheck="false" autocomplete="false" autocorrect="false" placeholder="search intranet" value="<?=$intranet_search_query?>" />
<input type="search" id="intranet_search_ac_hint" spellcheck="false" autocomplete="false" autocorrect="false" disabled />
<input type="submit" id="intranet_search_button" value="Search">
</div>
<div id="intranet_search_ac"></div>
</form>
</div>
Which emulates Google's autosuggest inserted into the element #intranet_search_ac via javascript. This works as expected.
However on Chrome for Android (40.0.02214.109) I get the following suggestion appearing on top of my suggestions (highlighted below):
As you can see from the form I am using the usual spellcheck="false" autocomplete="false" autocorrect="false" attributes. Is there any way to disable this behaviour?
try using
autocomplete="off" autocorrect="off" spellcheck="false"
Currently it's not possible. I reported a ticket to support autosuggest="off", you can vote for it. https://bugs.chromium.org/p/chromium/issues/detail?id=901839

bootstrap 3.0 on android phonegap

is there any known issue of bootstrap 3.0 (the latest one) on android phonegap. I am able to see the buttons nicely on firefox (and on same resolution as on phone) but when the binary is installed on the phone the buttons do not render....
is this a known issue ?
Following is my simple template:
<div id="mcontent">
<div id="swrapper">
<div id="islider">
<div class="btn-group btn-group-justified">
<a class="btn btn-default" href="#">Mrs</a>
<a class="btn btn-default" href="#">Ms.</a>
<a class="btn btn-default" href="#">Mr.</a>
</div>
<form>
<input type="text" name="firstname" placeholder="Firstname">
<input type="text" name="lastname" placeholder="Last Name">
<p><input type="text" name="email" placeholder="Email"></p>
<p>Must be at least 8 characters long</p>
<input type="password" placeholder="Password">
<input type="password" placeholder="Password repeat">
<p><button type="submit" class="btn btn-primary btn-large btn- block">Submit</button></p>
<p><span id="dclaimer">By registering you confirm that you accept our Terms of Use and Privacy Policy</span></p>
</form>
</div>
</div>
</div>
I know this is an old post but I have had the same issue. I believe this is down to jquery mobile. As when i removed it, it worked
Removing just the css of jquery mobile seems to keep jquery mobile functionality and allow bs to work

Categories

Resources