I am using page object model using page factory selenium using Java I have page class for example: I want to check if all the elements defined in the page class are displayed on the webpage. I want to perform this on in all my page classes. Looking for reusable generic method which can be written in BasePage and can
Tag: webdriverwait
How to click on Close icon/element on the Facebook sign-up page using Selenium Java?
I am new to Selenium and learning. On the Facebook sign-up page I want to click on the X as shown in the below screenshot, but I am unable to click it. It’s an img element. Answer The desired element is an <img> tag which is the preceding-sibling of a <div> tag which is the immediate ancestor of the <div>
Is there any get body tag method for WebElement class in Selenium Java?
I’ve been trying to get body of pages within HTML source. I’ve been trying it with WebElement Class. I can’t access invisibilityOfAllElements method or let me say it throws error. I’ve written code like that: waitbody is object of WebDriverWait Class that I’ve defined. Eclipse highlights underline of invisibilityOfAllElements. Is there any idea to solve this? Thank you. Answer invisibilityOfAllElements()
org.openqa.selenium.ElementClickInterceptedException: element click intercepted error using Selenium and Java in headless mode
I have a project that I am working on with java and selenium. the test work OK in UI mode. However in headless mode I get this error how can I resolve this issue (working in UI mode). this is my code why in selenium there is no operation to move to the element and break all layers. this is
How to right click on a link and open the link in a new tab using Selenium through Java
I am trying to right click on the Forgotten account? link on the Facebook login page using Selenium but it is not working. I am trying to send.Keys() after contextClick() but the key press is …
How to wait for invisibility of an element through PageFactory using Selenium and Java
Is there a way to wait for an element not present in Selenium using PageFactory annotations? When using: to locate the element, and then: I would get: I am able to do what I need by using: However, I would like to be able to use the PageFactory annotations in order to keep the framework consistent. Is there a way
Selenium – select an input from an angularjs component
I have an AngularJs component that contains an input of type text. I have used the following code to enter a date. It fails most of the times when I run the test headless. There are a few other inputs before the datepicker that I fill in. But when the test reaches datepciker, it fails because it can not find
“FluentWait cannot be applied” error in until() while checking for a string
I have a Selenium test that checks if a certain string can be seen on the testpage. My idea is to use an explicitwait if the page doesn’t load immediately. After that I did: So it has a waiting time of max 10 seconds before continuing. If it sees the element within 10 seconds the test continues. But i get