Unable to locate UIATextField in mac machine using Appium - xcode

I have the below code in Appium to automate mobile application.
MobileElement objelement=null;
wait = new WebDriverWait(mobileDriveriOS, 15);
objelement=(MobileElement)mobileDriveriOS.findElement(By.xpath("UIAApplication[1]/UIAWindow[1]/UIATextField[1]/UIATextField[1]"));
objelement.sendKeys("Test");
Here mobileDriveriOS is an object of type iOS driver.
Instead of 'sendKeys' tried with click also it dint work out.
The error is "An element could not be located on the page using the given search parameters"

Your xpath query is missing the first two slashes from search criteria. This should work better:
objelement=(MobileElement)mobileDriveriOS.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATextField[1]/UIATextField[1]"));

Related

How can I view specific instances of errors in Sentry

For instance:
I search for errors that happened to a specific user by searching for their email address in the search bar. That brings me back a list of errors. When I click on one of the errors it shows me a similar error that happened to a different user. How can I find the exact error that occurred for the user I searched for?
Thanks in advance,
Dan
Assuming you're talking about Sentry 9 (current version). Inside of an issue, go to the events tab:
And there should be another search box to search for concrete events within that issue.
Piggy-backing off of Markus' answer, I'd add that the syntax for this events search screen is different than the main search.
I found this issue:
https://github.com/getsentry/sentry/issues/2898
The syntax of event.timestamp is mentioned, however it doesn't work on the event page (perhaps because the event is implied?).
These examples work for zooming into a specific time and device:
timestamp:>2022-08-15 timestamp:<2022-08-17
timestamp:>2022-08-16T09:00:00 timestamp:<2022-08-16T16:18:00
device.family:SM-G990U

Google picker does not work without filter being applied for some users

we have an integrated with google picker(read-only scope,Docs view) it use to work fine but recently some users are getting blank screens as soon as the pop up shows but when they select some filter everything starts working fine after that no problems.
using developer tools i see all apis returning 200 for that first request
but there were no docs in response(i believe this is the api responsible for bringing docs in picker 'https://docs.google.com/picker/pvr')
when there are no docs returned in above api google is calling another api i assume it is to log error's probably(//docs.google.com/picker/ohnoes)
this api has following error params in it
&error=Cached and requested query mismatch
&line=Not available
&viewToken=["all",null,{"query":null}]
&ms=97
&transferDocs=false
&numErrors=1
has anybody else faced the similar problem
what do error "Cached and requested query mismatch" means in context of drive docs
Fyi - most accounts facing this problem seems like are of company domain for ex "jondoe#company.org"(this is a google account with company domain)
Filters Image
Thanks for your help.
not sure but looks like issue was may be related to google bug
https://issuetracker.google.com/issues/64825685
for me the code that was not working was:
addView(google.picker.ViewId.DOCS)
replaced this code with below code which works as expected
var view = new google.picker.DocsView();
view.setIncludeFolders(true).setOwnedByMe(true).setParent('root');
addView(view).

invalidselector exception + selenium

I have been hit with InvalidSelectorException on a regular basis when i run my selenium web driver test script
My test fails with this InvalidSelector Exception and throws message as :
The xpath expression '//form[#name=somelocator]' cannot be evaluated or does not result in a WebElement
The element locator i use is perfect which return a correct web element when i cross verify it using xpath checker / or with browser console, so no issue with the element locator
I click on some button and then wait for the above xpath locator element to load in the application UI and giving enough waitTilllElementVisible() methods before checking the above locator
I found that many faced this issue, but could not get the concrete reason for this failure.
Selenium asks to visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html for the documentation on this error, but this link looks not up
Reproduced it with selenium 2.45 and 2.46 version with IE11
Please let me know if you knows the reason for this and why it throws invalidSelector exception on browser open with webdriver
I think the problem is the SPACE character in the #name tag. Try "//form[#name='some locator']" or '//form[#name=\'some locator\']'.
#peetya's answer is probably correct and a better answer but I prefer CSS Selectors... they are less error prone if you have the option to not use XPath.
driver.findElement(By.cssSelector("form[name='some locator']"));
CSS Selector reference

Use Firebug's Net panel Data for output?

Is there any way to use the information that is seen in the Net Panel section of firebug? If Firebug/FF can get that data, why can't we use that to output info to our DOM?
My app uses a modified version of this AJAX Solr framework. Try entering York" as a serch term (note the one set of quotes).
This will give an error. Check out the difference between the error in Console vs what is under the GET error message in the Net panel.

AJAX not getting invoked through QTP

I am working on QTP 11. I my current project I am trying to automate a website with AJAX fields. I my project I have a text field on which if we try to enter characters then AJAX table appears and we have select a suitable value from the below table. I am able to check the existence of AJAX table.
The problem is to set the text field through QTP, AJAX is not getting invoked. But manually it is working properly. Also, if I first try manually and then I try to enter any through the script, then also it is working properly. It is not possible for me to check each field manually then enter it through script. So can any body tell how AJAX can be invoked on first try without any manual intervention?
I have tried to Set property, Keyboard events like WScript.shell, Mercury.DeviceReplay and AutoIt, however none of them are working. Are there any keyboard input methods that I have missed out?
Can somebody please help me out?
Try performing a WebEdit.Click on the text field in question. If this doesn't work it means that the web page is expecting some events that QTP didn't fire in this case you should change to device replay mode
Setting.WebPackage("ReplayType") = 2
Browser(...).Page(...).WebEdit(...).Click
Setting.WebPackage("ReplayType") = 1
I had the same issue, not recognizing the web list (not selecting the item from list). Using QTP 11.5 loaded with web toolkit 2.0, ASPAjax, DOJO, JQuery add-ins. Still showing the same behavior.
However there is nothing wrong with the code, if I give some wait the code is working OK.

Resources