J2ME Polish Textfields and Symbian^3 Touch Devices - mobile

today's question is about the use of textfields in J2ME Polish for Symbian^3 devices.
In my code I have something like this:
TextField digitValueText = new TextField ("Number", "", 1, TextField.NUMERIC);
This works perfectly fine on other symbian devices (s40, s60, etc), however, when I go and test it on a Nokia N8 (Symbian^3) I can't input numbers, nor does the device allow me to select the textfield to popup the keyboard.
Has anyone else gone through this problem?
the textField has to be numbers-only since we don't want the users to input text (it's for authentication).
Thanks in advance!
EDIT: So it seems that this behavior is from polish.TextField.useDirectInput, TextField.NUMERIC inherits the behavior by default...
still any ideas on this?

Change the project configuration to Generic/AnyPhone.

Related

Unable to select an option from Spinner using Appium 1.6

I am using Appium 1.6 to automate Android UI Tests.
In this image, I am unable to select any country (ex: Japan) from the spinner.
This is the code I am using:
driver.findElement(By.id("com.akkipet.android:id/country_spinner__add_information")).click();
driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector()).scrollIntoView("+ "new UiSelector().text(\"India\"));")).click()
What am I doing wrong? After clicking on the spinner, though I'm not able to read the country values, I can read other fields like First Name, Last Name etc.
For now, I am using the tap functionality to tap at the specific coordinates to choose the required option. But this will make it device specific. Further, since the options list varies depending on the environment, I will have to give a different set of coordinates for each environment.
Code for Tap:
touchAction.tap (200, 850).perform();
Could anyone suggest a better workaround?
Try this one. It worked for me.
driver.findElement(By.id("com.akkipet.android:id/country_spinner__add_information")).click();
driver.findElement(By.name("India")).click();
By.Name has been deprecated. Try using findElementByAndroidUIAutomator.
Eg:
driver.findElementByAndroidUIAutomator("new UiSelector().text("India")").click();

Password hide in textfield codenameone

I used the following code to hide password in textfield.
TextField passwordTextField = new TextField("", "PASSWORD", 20, TextField.PASSWORD);
What happens in device is that when I start entering the password, only black dot is shown. A letter should be shown while typing and when other letter is typed, the former letter should be hidden(black dot). But only black dot is seen. The same code works in iOS though.
That sounds like a security feature of the native device that is probably unrelated to Codename One.

Button does not work on some mobile devices (eg iPhone6, Androids)

this is my first question here and I was adviced to place this topic here.
I got a responsive website based on the AURA (PI-)theme. For the xs2 breakpoint I do show another slideshow on the homepage, where I have placed an button as call to action (other button type didn't work either)
On older smartphones like iPhone4 and 5 it is working. But on newer device it ain't.
Please take a look onto this test-page.
You can also check within chrome browser emulating such a device. There the click on the "Explore"-button doesn't work either.
Any help is gladly welcome and I appriciate it very much.
Thank you!
It's quite simple. You got a slideshow with a swipe handler which probably sets a preventDefault for swipe and click/tap. If I try to click it on a test device (android 4), it won't work either. But it does work if i hold it down and then press open. So it's not about the z-index (common error) but about the preventDefault. This means you would have to assign the link to the button/s in the slideshow with javascript.
EDIT:
To assign a link to an element using javascript (just javascript, no jquery or any other library), just put something like that into a script tag or javascript file:
document.getElementById("ID-of-your-button").addEventListener("click", function(){window.location.href = "http://link-desti.nation"});
and that should work fine. If there is another problem with it, just write a comment below please. I will reply on it as soon as possible.
P.S.: Sorry for the late edit, I was having hilariously much work on a "do immediately" level the last days.

is it possible to fill in a windows credential prompt programmatically?

Issues of robustness, stability and you shouldn't do this aside, has anyone ever filled in a windows credential prompt via code (so that's one that looks like this:)
Is it possible to interact with these dialog boxes through Win32 APIs, or using SendKeys/send mouse / UI Automation? Any ideas / tips anyone has would be greatly appreciated!
I ended up using the UI Automation framework, which allowed me to grab a reference to the credential prompt and then fill it out and complete it that way.
Code snippet:
AutomationElement desktop = AutomationElement.RootElement;
//get all windows on the desktop
AutomationElementCollection windows = desktop.FindAll(TreeScope.Descendants, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Window));
foreach (AutomationElement window in windows)
{
if (window.Current.ClassName.Equals("#32770")) //security dialog
{
// access the appropriate AutomationElements to enter credentials here
}
}
To interact with an element, you grab the appropriate Pattern object and call its methods (eg Textboxes have a ValuePattern which has a .SetValue() method.
I also used UISpy to find all the values for things like ClassNames, AutomationIds, etc to help find the correct item through .FindAll() and PropertyConditions objects.
Use something like AHK (Auto HotKey) it is a simple language that can be compiled to an EXE and is designed for automating the keyboard and mouse.
Or you could do it from WPF:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/6fc7f1f6-f3e2-4b32-9d2b-9c7a2680e04a/
Or users could simply tick "Remember my credentials"

How (or should I) markup phone numbers in a website?

Im mobile optimising a website with media queries. Without any extra markup the phone numbers seems to be recognised and become 'clickable' on iphones and android, but my windows phone emulator only recognises the 2nd 1/2 of one the numbers.
This method doesnt work on opera mobile:
1234
http://developer.apple.com/library/safari/#codinghowtos/Mobile/UserExperience/_index.html
This method makes the link clickable in desktop browsers, even if the browser doesn't know how to handle the number:
<a href=”#” tel=”1234”>1234</a>
http://www.wpromote.com/blog/google/optimizing-your-web-site-for-mobile-3-easy-tips/
So whats the best solution or trade off for markup around phone numbers? Thanks
The first example (tel:) is an RFC standard: http://www.ietf.org/rfc/rfc3966.txt and, as far as I know, there is no "tel" attribute, so i would prefer the tel-URI.

Resources