I need to scrape a website with content ‘inserted’ by Angular. And it needs to be done with java. I have tried Selenium Webdriver (as I have used Selenium before for scraping less dynamic webpages). But I have no idea how to deal with the Angular part. Apart from the script tags in the head section of the page, there
Tag: selenium
Best way to store locators
I’m following page object design pattern for Selenium automation and I can guess that many people store locators in .properties file and access them in code. It seems great to keep locators at separate place. Since, I haven’t work on any big project for Selenium automation, I would like to know thoughts on following so that I can avoid problems
How to download XLSX file through firefox using Selenium in Java?
I am trying to download an xlsx file using the following code: But the test stops after displaying the download dialog box, and it is not downloading any file. But if i try the same code for csv file by changing the mime type mentioned in the above code, then it works fine. Please help me. Thank you. Answer Instead
How to use if else condition for searching element using WebDriver in Selenium?
I used else if concept I have not used try catch finally concept webdriver element finding using elseif loop how I want it to work : First it will check for “if” condition that is [if(driver.findElement(By.xpath(“username”)).isDisplayed())] and if it is not found it will not print any statement. because “if” condition is not seen it will go to “elseif” condition
Can I verify that an input field is masked or shows the text?
Using Java and webdriver, I’m trying to setup a test to verify that the password I type is masked. With my tool, we have a setting that allows you to have the password masked or to show the text. I was wondering if anyone has ever verified something like this with Selenium. Here is what I want to check Setting
How to verify an attribute is present in an element using Selenium WebDriver?
I have many radio buttons on my screen. When a radio button is selected, it has an attribute of checked. When the radio button is not selected, the checked attribute is not present. I would like to create a method that would pass if the element is not present. I am using selenium webdriver and java. I know I can
Selecting Nth-of-type in selenium
I’m trying to use By.cssSelector to grab the nth dom element with class c3 with a structure like this: Testing my CSS selectors, I’m becoming increasingly confused. This selector selects the 2nd instance of c2/c3 correctly: while: select nothing. Even worse, translating this into selenium, I seem to consistently find nothing for all 3 versions. There are plenty of alternative
Selecting an item from a combo box selenium driver with java
I tried to select an item from a combo box through selenium driver with java, but it didn’t work. This is my code… Answer In WebDriver there is separate Class (Select) is there to deal with Combo lists. Use below logic to select options from pick list fields Refer this post for more info regarding Select class.
How to specify order of execution of Java classes in a Selenium-Java Webdriver test project
I have to automate a test-suite for a web application which let user connect and sync with their Dropbox account. I am using Java Selenium Webdriver. Here I have created test classes like this. Class1.java – Test case to check if connected to Internet. Class2.java- Test case for sign in with Dropbox Class3.java- Test case to verify if Dropbox folders
Selenium / Firefox: Command “.click()” doesn’t work with a found element
I tried to find a solution to this thing and I spent a lot of time, but it is almost imposible to me to do that. The matter: I am using Selenium with Java in Firefox. I need to find an element (a listbox) and click on it. So, the code finds the element, but click action does not work.