The accessibilityHint gets appended in the "accesibility id" in the appium inspector - react-native

When I am trying to add accessibilityLabel without accessibilityHint, I'm getting error that has accessibilityLabel prop but no accessibilityHinteslint(react-native-a11y/has-accessibility-hint). But on adding accessibilityHint it is being appended in the accessibility id in Appium inspector. like the following:
Just want to know if there a way to stop accessibilityHint from getting appended in the accessibilityLabel?

Related

How to get identifiers for Uielements using appium inspector for an app generated with appcelerator

I'm trying to get identifiers for Uielements using appium inspector for an app generated with appcelerator
When I used Appium inspector to get UIElements IDs the result for both elements is similar to
name:
type: UIATextField
value:
label:
hint:
enabled: true
visible: true
valid: true
location: {73, 37.5}
size: {218, 15}
xpath: //UIAApplication[1]/UIAWindow[1]/UIATextField[1]
In both cases I can't retrieve the name property
Mi index.xml is similar to:
<Alloy>
<Window class="container">
<TextField id="username"/>
<TextField id="password"/>
</Window>
</Alloy>
Which property should I use to identify UiElements?
Do I Have to use xpath instead to identify this elements ?
Best Regards
I have not found a way to specifically set the id field on a native control. I hope that someone out there knows a module or something that can do this better, but until then, here's how I do it.
There's a field called accessibilityLabel on Titanium's View classes that I use to identify my textfields/buttons. In iOS, Titanium will set the name and label properties of the native controls to the accessibilityLabel field. Then, you can simply use XPath to find them via a query like //*[#name='usernameField'].
Android will work a little differently and will set the content-desc field and append a . to the end of it, but the query is still as simple as //*[#content-desc='usernameField.']
Two caveats: iOS will start to hide nested elements from XPath if you set the accessibilityLabel field. So if you set an accessibilityLabel on the top level View class, you won't be able to query anything within that. The other issue is I don't have any experience with accessibility features in iOS and Android, and this solution may certainly impact any plans you may have to use them.
Hope this helps

tooltipster.js: Tooltip getting overlayed on one another

Here's the JSFiddle:
https://jsfiddle.net/68umt5b3/
As you notice, tooltips are getting changed, but they overlay on one another. Removing 'multiple: true' helps, but my MAC gets overloaded and browser crashes, saying:
Tooltipster: one or more tooltips are already attached to this
element: ignoring. Use the "multiple" option to attach more tooltips.
I only need one tooltipster shown at the time. How can I fix this?
Use the content method to update the content of the tooltip, or destroy it and create a new one.

Unable to click button in mobile web in appium

After exhaustively searching for this over various forums, I still don't have an answer.
Here are complete details
I'm identifying the element through classname which points to multiple(4) buttons. I'm iterating through buttons and then search for text and when there is a match i click it.
This works fine with selenium webdriver and browsers such as firefox,chrome
Now I'm doing the same thing with appium.
Out of 4 buttons which are identified through classname, the script clicks 2 buttons successfully but for two buttons click happens(i can see the button being clicked) but new page which should be loaded is not loaded. The buttons for which click is not happening are in a footer class and other two are in div class.
Things i have already tried
Actions builder - click(), clickandhold()
Javascript executor
I'm currently trying with touch options, tap and by switching to native view but haven't found any success.
If any has encountered the same, a solution will be appreciated.
I want to avoid xPath because that might change in the page I'm working on, and I want to stress that the script is able to find the button, but is not able to click it properly.
You can filter your locator by using class name and index. Like this:
driver.findElementsByXPath("//*[#class='android.widget.ImageView' and #index='0']");
This xpath won't get change on other devices too.
Could you see: Unable to find an element in Browser of the Android emulator using Appium and C# ?
In case of testing web apps in browser the elements should be located as usual elements on the web page ( not as some classes like android.widget.EditText and android.widget.Button).
Upadting appium java client to 1.5.0 (from 1.3.0) solved the issue. Need to check why!

Appcelerator Titanium, getting the current window and applying property not working

I'm trying to add a right nav button in iOS to a windows in Titanium.
The code is just the original "master/detail" starting template provided by Titanium and then in MasterView.js, I try to add a button to the navbar.
But it doesn't work like it was supposed to:
var addBtn = Ti.UI.createButton({
systemButton:Ti.UI.iPhone.SystemButton.ADD
});
//self.setRightNavButton(addBtn);
var win1 = Titanium.UI.currentWindow;
win1.setRightNavButton(addBtn);
This fails with the error:
[ERROR] : Script Error = 'undefined' is not an object (evaluating
'win1.setRightNavButton') at MasterView.js (line 14).
How can I add this button to the navbar then? I've seen some examples but they all rely in having the navbar declared in place. In this case that ain't possible since Titanium declared the navbar in the AplicationWindow.js specific to each platform and then calls the MasterView.js function and file where I'm supposed to define the navbar button.
Ti.UI.currentWindow only works if there is a window already open. The error you have is coming from the fact that when you create the MasterView, you have not yet opened up the window.
Look inside ApplicationWindow.js, you will see that you create the masterview before even opening the window.
If you want to set navbar items, either add them in the ApplicationWindow, app.js, or pass the window to the MasterView.
Ti.UI.currentWindow only works if a window is opened using the url parameter. In that case, the controller that is referenced by the url parameter will have the Ti.UI.currentWindow property set to the window.

Colorbox doesn't show up - Error $.data(this, colorbox) is undefined

I am trying to load the pop image on the category page but I get this error upon clicking on the image.
Timestamp: 10/27/2012 7:15:10 PM
Error: TypeError: $.data(this, colorbox) is undefined
Source File: http://woodanta.6point9.in/catalog/view/javascript/jquery/colorbox/jquery.colorbox.js
Line: 246
The colorbox is working on the products page but not on the category. Can anyone help me with this?
Category: http://woodanta.6point9.in/index.php?route=product/category&path=60
Product: http://woodanta.6point9.in/index.php?route=product/product&product_id=50
Colorbox adds it's settings object to the elements it's assigned to, using jQuery.data(). This settings object is being removed from your elements between the time you assign colorbox, and the time you click on a link. This usually happens when copy/replacing elements in the document (using $.html()), which does not copy data stored using $.data, rather than cloning them or appending/prepending the existing elements.
I suggest disabling your scripts that are unrelated to colorbox to determine what script is causing the problems. Also, you may be able to avoid the issue by waiting until the other scripts have executed before assigning colorbox to your elements.