Appium Automation - automation

I want access to highlight selected like image, but accessibility id and xpath in the app is constantly changing. So have any other way to access it? I tried findElementByXPath("//android.view.View[#index=0]") but it not working;

Related

How to get the Check box status in Citrix Environment in Uipath Automation

These are the Check Boxes which i need to check the status and if these are not selected I need to check the box , as this is a citrix environment not able to get the correct/complete selector of that check box.
Tried Element Exist , Anchor Base & Get Attribute ,all these activities are giving the output that is False even when the box selected.
Any suggestion will be helpful.
In citrix environment I use Image Exists activity of UI path to get value of a checkbox. I am not sure if there is a better way of doing this but it gives accurate results. You can also use Click Image activity to set the value of checkbox.
If you're on a recent version, you can perform native Citrix automation, without the need for image automation, check this out:
https://studio.uipath.com/docs/about-native-citrix-automation
If you configure your environment for native automation, you can use the "Get attribute" activity and that should expose the state of the checkbox as well.

Selenium not found element while page is opening in small screen

For our web application I wrote one selenium script, which is working very fine in my office workstation (which has big screen).
When I execute the same script for the same application in my laptop(which has small screen) it is not able to find the element.
Actually when I open the application in my laptop some elements are visible only when I scroll down the page but those element are visible in big screen without scrolling. Application view is automatically adjust as per the screen.
So, for these application how I can write the selenium script so that it will work any kind of screen ?
What do you mean by "it is not able to find the element"? Which error did it show?
In my own experience with automation, in some specific scenarios, the behavior of the app change when the scrollbar appears (for example, when I try to click on an element, it scrolls down to that element, but "jumps up" to the element above it - this I can reproduce manually.)
Some test scenarios are quite sensitive with scrollbar, for example drag&drop.
You should analyse each failed test separately and find a solution for each case.
Selenium cannot find element that is not visible, you must always check if element is visible and if not scroll to this element.
see this question Scroll Element into View with Selenium

Unable to locate elements in Sharepoint modal window with Selenium

Using Selenium, I'm uploading a file to SharePoint, using upload.aspx in a modal window (So, this is SharePoint out-of-the-box. For whatever reason, I am unable to locate the iframe that SharePoint is using. Can anyone suggest to me a useful technique for this, in SharePoint?
I had the same issue and came up with the following code. This works even if frame name or ID changes dynamically.
driver.switchTo().frame(driver.findElement(By.xpath(".//iframe[#src='yourFrameSourceFromHTML']")));

How to enter text into user name when user name text field is on different frame using Webdirver

I have to login to application. But username and password text boxes available on different frame on the UI.
When i record using the IDE and exported into JAVA then same code is not working.
I am getting an error saying element is not present. This because the text box is on additional frame on the UI.
Kindly let me how to get the control of this frame and then enter the text.
Thanks,
Md Ashfaq
are you recording via ide on firefox and then running your tests on some other browser?coz sometimes diff browsers interpret it differently[I have faced issues where same webpage had iframes in firefox but not in IE].kindly check on that front.
Use The API capability to SwitchToFrame() then Look for element and interact with.
Note: You'll have to switch to any frame needed i find it efficient doing a selectDefaultFrame, try Iterating within Available frames and get handle/frame names

Sikuli integration with Selenium WebDriver

Can anyone tell me how to work with multiple edit boxes using Sikuli integrated Selenium WebDriver.
For example, I have 2 edit boxes which are labeled as username and password. So I want to click on the 1st edit box, then enter values and again want to click on the 2nd edit box. The size of the two edit boxes are the same. So how sikuli integrated Selenium WebDriver will identify which edit box to click.
If you are referring to the SikuliWebDriver, then this link has an example on the usage http://code.google.com/p/sikuli-api/wiki/SikuliWebDriver.
I would rather prefer using the Sikuli Java API and create wrapper functions around the Sikuli functions like click, type etc. This API is in active development and has good support available.
http://doc.sikuli.org/faq/030-java-dev.html
You can use the offset functionality. ie, you do not only use an image of the text field, but use a region of the screen which identifies something related to the text fields.
You may select a large rectangle which includes a heading above both fields, then use offset x/y coordinates and move the little crosshair over the exact location you wish to click/type.