Automate browserstack: Keyboard is not open on iphone web safari - appium

I am able to launch URL on safari browser using Appium and
"#wdio/browserstack-service"
but the keyboard is not opening, and the script is not able to enter text in the input field. It works fine on physical device( Both Android and iPhone), it also works fine on browserstack Android chrome browser. This issue is only with iPhone safari. Please can somebody help?
I tried with different capabilities.
realMobile: true,
but nothing seems to help

Hello, Please find your answer. There is no separate method to open keyboard - it is only opened when an element with input focus is activated. Regarding how you activate it - try to perform the click in native context.

Related

Facebook comments plugin not working on iOS Safari

I am trying to implement the FB comments plugin (https://developers.facebook.com/docs/plugins/comments/) on a website. It's loading fine, but on iOS Safari the user cannot click into the comments field. When trying to click into the field, a quick visual glitch happens, and then focus is lost.
On some phones, if I log into facebook in the same browser, this makes an alert appear, when clicking into the field, to allow facebook tracking. After accepting that I'm allowed to click into the field.
I haven't managed to find any info on this. It's working fine on desktop/laptop macs and PCs, android and in iOS Chrome. But specifically in iOS Safari (on some phones) it's bugging out.
Does anyone know anything about this bug and how to fix it?
It's the settings -> safari -> Hide IP Address (from trackers) switch that stops the FB plugins working!

PWA iOS getting the sms: tag to open iMessage

We are currently developing a PWA for a client of ours. Everything has been going well, but while testing on iPhone (iOS 12.2) we are having an issue with the tags that have sms:123-456-7890 in the href. You get the "Safari cannot open this page because of the sms: tag" (paraphrasing).
If you are browsing the site via Safari (not in the PWA mode), the anchor tag works fine and your iMessage opens up with the number in it. But when you're in the PWA mode and click the link, you get a version of the message I mentioned above.
From doing research, this appears to be some sort of bug in the iOS 12.2 release, though not officially mentioned.
I'm curious if anyone has had any luck with a work-around for this issue?
Thanks in advance.
Edit..to add some code for the anchor tag....
123-456-7890
I've tried many different variations of the sms (with no // or ;), always same outcome when clicking it as a PWA. With Android, everything works fine in PWA mode.
I did find a workaround by using JavaScript
Code Example:
<a href="#" onclick="openSMSMobile();" >
function openSMSMobile(e) {
window.open('sms:1234567890', '_self');
return false;
}
And in case anyone is wondering, if you'd like to add text to the message body, you can use,
window.open('sms:1234567890&body=textGoesHere', '_self');
For Android you'll need,
window.open('sms:1234567890&body=textGoesHere', '_self');

Universal links (Deep linking) not working on iPhone but works on iPad

I am trying to build deep linking feature into my app. I did all the necessary set up for deep linking to work like, enabling associated domains in my app, adding apple-app-site-association to the root directory of my server, and I am serving a valid apple-app-site-association over https, I also validated my apple-app-site-association using this tool Validate your apple-app-site-association.
After doing everything right, I tested the deep linking feature on my iPad and it worked as expected. But when I tried to do the same on my iPhone it doesn't work, it always took me to safari. I tried it on 6s device, I reinstalled the app, I cleared Safari website data & cleared the history. Also updated the iPhone & iPad to iOS 9.3.5. The updating the OS didn't change a thing.
iPad still continue to work with deeplink URLs just like it did while it was on 9.3.4. iPhone still opened the link in safari.
Please give me some pointers on how to workaround this issue, I think this might be an apple bug but again I don't understand how it can work on iPad which is running same software as iPhone. Any help or guidelines is much appreciated.
Thanks.
I was able to fix this issue and this is one of the annoying issue that I have come across, because it doesn't say what is going wrong.
Fix: Whenever the iOS opens your link in safari, you need to pull down the webpage in safari and there you'll see a banner saying that, open it in the app. Once you click on that banner your future links will start opening the app instead of opening it in the safari browser.
There was no error whatsoever and there was no indication why the link was getting opened I am pretty sure that, iOS didn't download the apple-app-site-association whenever I installed the app.
Also note that the banner in the webpage will not be visible whenever your link opens up in safari, you need to pull down the webpage and then the banner will become visible and if you click on open in app banner, it will start opening the links in app.
If in future if you select to view the link in safari by clicking on context menu which appears on right hand side of the status bar, which will be saying "Open in [your app name]" in safari, the links in future will open in safari instead of app, and again if the banner open in app isn't visible, you have to pull down the webpage to see that banner.
HTH.
In iOS 13, similar problem of direct links not opening the app instead it open the safari website directly.
Fixed by updated the below safari setting...
Settings > Safari > Request Desktop Website > All websites > Switch Off
I was facing the same issue in iOS 12, on one device the link redirected to my app and on another device it was always redirecting to Safari and pressing the link on the Notes app was only allowing me to open it on Safari.
What I believe happened was that I pasted the URL in the browser and clicked Go, as I thought it would redirect to my app. No matter what I did ( reinstalling the app, restarting the device, ... ) the results were always the same, redirecting to Safari.
What helped me was deleting the cached data for my domain ( Settings -> Safari -> Advanced -> Website Data -> Swipe and delete the data for your domain ).
After that, everything started working.
I believe this is a bug with iOS Simulator,
In my case it was occurred when I entered an invalid address (with multiple spaces) for example:
Valid One: myApp://order/10003101
Invalid One: myApp://order/1003131
It stopped working even with Valid One and the solution was to clear Safari Website Data:
Go to Settings/Safari -> Clear History and Webstie Data
Device: iPhone 12 Pro Max
iOS: 14.5
Xcode: 12.5

Mobile browser crashes when loading page

Recently we found problems that sometimes our webpage crashes on iOS. Its happening both in Chrome and Safari. Has anyone idea how to debug it, or why its happens ?
Its hard to reproduce (actually on some phone we were not able to). So we are trying turning off some components from the page. The page contains lot of HTML (20-100 pages) and some bit heavy javascript components, such as maps, street view or even graphs.
Thanks for any idea or hint. Thanks!
You can debug the webpage, when it is loading on your mobile browser(Safari).
Follow the below steps:
Connect your iOS device to MAC--> open Safari on MAC --> In the menu bar you can see Develop option --> On selecting the develop option it will show all the connected devices--> keep the menu popup open and browse your webpage on the connected iOS device.
Note : If your device doesn't show up in the develop option please enable it in iOS device settings --> Safari --> advanced --> Web Inspector.

how can I emulate iPad browser on Windows

How can I emulate iPad browser under windows? I know user agent string and I know browser width/height, screen width/height
I believe if you emulate the User Agent of the iPad and set your windows size appropriately, you can use Safari (windows download from apple.com) and works pretty cool.
Also i haven't tested this, but http://code.google.com/p/ibbdemo2/ looks like a great iPad emulator.
For anybody else still looking, follow these steps for Safari 4+ : Mobile Safari Settings on Desktop Safari
It can be done via Browser Stack
So do you guys know there is one more option and that is google
chrome. Yes google chrome provides developer toolbar where you can
inspect your element or debug your js files or you can see what are
the requests your site is hitting and receiving in the network panel.
It also having "Console" where you can emulate your site to different devices view.
Follow the steps below:
Open your site in latest google chrome.
Now right click and select "inspect element" or (F12) to get the devloper toolbar where you will find "Elements,Network,Sources....Console".
Click on console.
Now in the developer toolbar if you see at extreme top right you will find few options like "close the developer toolbar with cross (X) mark" but you click on "show drawer having this symbol (>-) kinda".
Now within the toolbar it will populate console,Search,emulation,Rendering.
Click on emulation option.
Just enable the emulation.
Now happily select whatever device you want and plus it will also tells you what is the resolution.
Please let me know if this is what you want and also ping me if you have any issue. You can read more here.
I am enable to add image since my rating is less by "1". if I get that rating I will attach image and then it will be clear to all. The previous link has images if you want to check it out thought.
http://transmog.net/ try this site.
I use for testing on linux.

Resources