How to click on element under ellipsis (three dots) in a web page using selenium-webdriver - selenium-webdriver

Need to click on element which is under ellipsis using selenium.. after clicking on ellipsis and inspecting on element in the list is not giving the html code in developer tools, could someone help on this?
I have written locator using displayed text, it's working for few but not for few others.

Related

Checkbox is not getting clicked properly in testproject or andriod app

i have an android app where it has 3 checkboxes in a view. All three controls are of type andriod.widget.checkbox. Along with these checkboxes there is a text content as well. Inside that text content, there is a link also. Now my aim is to click on that checkboxes. But when i click on the checkbox with testproject recording on, for one checkbox it is not getting checked though it is getting clicked and for the other two checkboxes, the link inside the checkbox is getting clicked and link is getting opened. Since it is a single view component, i could not differentiate between checkbox and the text. i have attached the testproject element explorer view and the screen view.
If you need to tap on a specific part of a mobile element (both Android or iOS), you can use the Tap element at relative point action.
You can hover the wrapper element of the element you want to tap on, double shift to capture it, and select the “Tap at relative point” action, by providing the Horizontal tap percentage and the Vertical tap percentage (notice: it starts from the top-left corner of the element) you will be able to tap on a specific point on the wrapper element.
Here you can read more about it and find an example here.

I can not identify a specific xpath for to select a button using Selenium front-end React

I am trying to uniquely identify and select a radio button {YES,NO} under a specific question.Since the developers are using React it is difficult for me to identify the specific buttons.In the developer tools, in the label class children i see the radio button with the unique name. However when i try to identify the name using xpath "//*[contains(#name,"ID_2")], or "//*[contains(#id,"ID_2-1")]` the chrome developer identifies the path, but the yes or no fields are not highlighted. When i hover over the parent class for the text "Yes" parent - the Yes button is highlighted. The issue i am having is, how can i uniquely identify this class so i can click on the button? I have tried using the absolute path, which works.Eventually that will break. If I use a simple xpath of (#class = "label__radio"), the developer will point to over 50 occurrences. I will greatly appreciate any suggestions
I am not sure which other direction to go since i cannot identify the field.
Html Code example:
Showing the Yes button being highlighted

Selenium Webdriver unable to recognize richfaces dropdown value

Firepath screenshot
Link to screenshot
In my environment only browser that works is Chrome. However application also has issues and does not render richfaces dropdown unless browser is zoomed out to 80%. When zoomed out, that's the only time the browser will display the dropdown value, otherwise at 100% zoom, Chrome displays a horizontal scrollbar shows in attached. I've exhausted all my methods to try to recognize the object at runtime but it won't recognize.
Also, the HTML is completely different when selecting dropdown vs. entire page.
syntaxes used to recognize the dropdown are as follows:
driver.findElement(By.id("orderCreationForm:j_id211:productSelect")).click(); //This line to click on the dropdown pulldown tree
driver.findElement(By.xpath("//span[contains(.,'Fish Hooks')]")).click(); //This line to click on the actual dropdown item
It looks weird because most likely your CSS is overwriting some of the RichFaces styling.
As for locating the dropdown menu - it's not under the inplaceSelect parent element but under <body>. Most elements created by RichFaces have a unique class name (within the component subtree) that you can use to find the element - the dropdown parent has rich-inplace-select-width-list.

Scroll down on the terms and condition Textbox and click on Agree selenium

I am working on Protractor tests. Recently my web page changed where the terms and conditions are inside a textbox. Button Submit works only when the user scrolls through the textbox and clicks on Agree button. I tried the following option to scroll down but it is not scrolling down. Any help is greatly appreciated.
var scrollbar = element(by.id('terms-conditions'));
var checkbox = element(by.id('checkbox'));
scrollbar.click()
browser.executeScript('arguments[0].scrollIntoView()', scrollbar.getWebElement());
browser.executeScript('window.scrollTo(0,670);')
checkbox.click();
I followed the below link too but no luck.
Protractor: Scroll down
The second js execute statement you are using contains Window.scrollTo which references an open window in a browser. and using it only scrolls the complete window but not the pop-ups that appear inside a browser window
Refer here for documentation on Window.scrollTo
Normally terms and conditions shows up in a pop-up or may be a div and hence Window.scrollTo doesn't work
there are two ways you can do it
SOLUTION 1: use Jquery scrollTop() to scroll inside a specific webElement
Step 1: Identify the exact div that holds your terms of Service scroll bar
Step 2: Refine your js statement by trying directly in Chrome console
$('.modal-body').scrollTop() -> This returns the current position of scroll
$('.modal-body').scrollTop(10000) -> This sets the value of top position
Step 3: Incorporate this in your protractor script
browser.executeScript('$('.modal-body').scrollTop(10000)');
You can professionalize this by passing the element & scroll amount as arguments. Refer here
SOLUTION 2; The best way I see to submit a pop-up is not to deal with interface but to deal with the 'form' element behind it. Similar to how we deal with file uploads.No fuss & effective
May be try something like this, by making button visible first and then submit form
browser.executeScript is an asynchronous call, so you will need to put it into the controlFlow so that it will complete before clicking the checkbox:
scrollbar.click();
browser.controlFlow().execute(function() {
browser.executeScript('arguments[0].scrollIntoView()', scrollbar.getWebElement());
browser.executeScript('window.scrollTo(0,670);');
});
checkbox.click();

accessing invisible popup in selenium webdriver?

in a interview they have asked below questions please tell me code or approach ...
1-how to access invisible popup.in selenium alert pop can be accessible using alert.accept() but if alert popup is invisible then how can we use.
2-code for automatic image display slider,some image slider has next and previous button we have to click next or previous so please let me know how to develop it in both way by clicking next button on image or automatic image display slider
i am using selenium web driver,java,Firefox
thanks a lot
For the 1st question, AssertEquals will help us to go through invisible pop-ups and for the second one, I am not sure that they have asked the slider next or previous button will be on image....if it is outside image, then we can verify that if its present than click on particular id else not.

Resources