Not able to handle special characters for mobile app element locator using robot framework and appium - eclipse

I am trying to test a mobile app using robot framework, appium and eclipse as IDE. My app login has to be clicked using the elements class and content-desc but when I copy the content-desc I notice a special character (Log In) which doesn't get saved in eclipse.
Please help me to find the x path using login or even without it.
PFA the screenshot of the elements at https://i.stack.imgur.com/XE3pg.png

In my case, special character was coming due to the icon associated with the text.
For Appium, it's better to use accessibility ids for finding the elements.
Hope this helps :)

Related

appium python - how to dump details of an element?

StackOverflow friends,
I'd like to find a programmatical way to dump a selected element in Appium Python.
The current solution from StackOverflow is to use
element.get_attribute('outerHTML')
but this only works in WebView Context. Nowadays most apps run in NativeApp context, therefore, the 'outerHTML' isn't available.
I saw Appium Inspector can display the selected element's detail,
I'd like to mimic this in Python, and print out to terminal.
I could have dumped the whole page using
driver.page_source
but I'd like to use the element-only dump to assert that I have selected the correct element.
By the way, I am testing on Android 13 device.
Thank you

Why barcode scanner opens Chrome developer console in chrome?

I just bought a barcode reader from China model Honeywell HH400. It works perfectly when I use it other device. But now I use it in my web application and I am getting a problem. It always toggle Chrome developer console. I also tried scanning barcode into URL bar, and it does the same. Does it have an event to trigger F12 what? Or misconfiguration with the scanner that I don't know?
I am sure that you might have already received a solution.
But for others who might come across this issue,
I ran into this problem today and found that no matter what prefix or suffix I try, on every browser it emulates pressing F12 which opens the browser console.
The same barcode functioned as required a couple of weeks ago.
Every barcode comes with a quick start guide that you can use to set prefix suffix etc.
There is also a bar code that "Recalls Defaults". Just scan that and you should have the factory defaults set.
This resolved my issue.
Hope it helps someone.
For me the solution was to remove the "Line Feed" suffix ( which was not removed when I scanned the "remove all suffixes" code ), as the line feed is interpreted as CRTL-J on windows machines ... no idea why !?
( no time to research it either ;)

point-of-sale-api iOS callback from FileMaker Go

I'm close to getting my homegrown POS app to work with Square, but I'm missing something simple and can't seem to turn up an answer. I'm using FileMaker Go as the app, but I don't think that that is relevant to my current proof-of-concept issue. It may be relevant to other issues later (callbacks).
In my point-of-sale-api settings, I have:
com.filemaker.go.17
for the Bundle ID, and
create-workflow
for the iOS App URL Schemes, which seems to be the first piece of code that Square allows me to save. Any prefixed item such as shortcuts://create-workflow gives an error without description (I'm hoping that Square will trigger a workflow as a test in this POC).
I'm hoping to just trigger safari or workflow/shortcuts with the callback as filemaker go doesn't directly accept the callback response without a helper application - which I'll eventually try.
Any thoughts on what I'm missing?
Thanks tons!

How to remove id location strategy from Selenium IDE

the problem is: my web application uses ZK, which automatically generates random UUID for each web element.
When I try to record some basic test-case with Selenium IDE, it automatically tries to use these randomly-generated ID's, without even giving me a good alternative.
Is there a way to forbid Selenium IDE to use IDs while locating elements?
Possible workaraounds:
Implement ID generator in ZK: I've thrown away this possibility, because the application GUI is too complex for this task, and ID should be unique for whole sesion, which make this workaraound really hard to implement, when you have same elements on different page.
Find another recording tool: I've only found XLT script developer, which does the work by writing DOM-path using classes (which zk gives plenty) - but sometimes the location strategy gives false path, which is then not reproducible. Any good alternatives here?
You can change locater builder by changing the order of the locater in options>locater builder.
For example if you want to give first preference to css: name drag it on the top so when you start recording it will first give the preference to css name
Hope this will help you

How can I do Junit tests for Google Maps in Android?

I am using the Google Maps API in an Android project and now I need to test it using JUnit if possible. (I am somewhat new to both JUnit and Google Maps.) I have been scouring the internet but was unable to find anything.
The map view has dots/pins for stations and when I tap one I get a balloon popup with the name and other info. Then when I tap the balloon I get a new view with information about the location and actions to perform such as navigate.
What I want to know is, is it possible to write a JUnit test case that finds all these dots/pins, taps them, and verifies information on the new view that pops up? Additionally, I would like to change/mock the location that the GPS has and see what happens if I try to, say navigate overseas or something like that.
I do have a list view of the same locations which I will test as well, but I would like to know if there is a way to test the map view.
I would prefer an automated test script like what JUnit provides. If this is not possible with JUnit what is the best alternative?
I am working with Android 4.0 and using Eclipse.
Any help would be greatly appreciated.
In case anyone wants to know after much searching I finally found something that can test Google Maps. Things such as zoom level and I believe tap pin (method is called tapMapMarkerItem()) are supported. I have not tested the pin tap yet tho.
Apparently the awesome Robotium does not support map testing by itself. Nicholas Albion was nice enough to create an extension to provides testing support for maps on Android. Thank you so much Nicholas!
So here it is:
1. Download the Robotium jars from robotium.org (I found this helpful http://www.vogella.com/articles/AndroidTesting/article.html - by Lars Vogel)
2. Download the extension from https://github.com/nalbion/robotium-maps