Search Posts

Category: selenium

Can I make selenium pause for input and resume on a trigger?

I am wondering if selenium can do below? I want to automate only certain parts of the automation flow: load a web page (built with angular), submit the form with some pre-defined inputs On the next page, automatically fill in some data like earlier, but wait for me to fill in some input on specific input fields (can’t hard-code this data) After this,a trigger (like a button press or key combination; outside of the webpage) […]

Is selenium click asynchronus?

I run automated test for angularjs website. I have clicked on button with ng-click and the line after “element.click” was called before the ng-click method in the javascript file. It was very weird and it makes me think maybe the “element.click” call is asynchronus. I searched for people who asked this issue and didn’t found any. Source: AngularJS

How to use XPath locators of selenium in AngularJS application for automation test

I am trying to automate our angularJS application, but I don’t want to use protractor or any framework. I simply using Selenium. The application is like WhatsApp and Xpath of a specific content(like group name,user name)is changes when getting a new message. For example, if there are 5 groups, 5th group is in last position .when a new message is came 5th group is in top position, and Xpath of 5th group changed. I try […]

Protractor can’t find value from a table

I have a table that displays search results, and it goes something like this: <table> <tbody _ngcontent-c4=””> <tr _ngcontent-c4=””> <td _ngcontent-c4=”” class=”owner”>company name</td> <td _ngcontent-c4=”” class=”name”> other name/a></td> <td _ngcontent-c4=”” class=”status”>kasutusel</td> <td _ngcontent-c4=”” class=”approval-status”>koosk├Álastamata</td> <td _ngcontent-c4=”” class=”topics”>value</td> <td _ngcontent-c4=”” class=”last-modified text-nowrap”>value</td> </tr> <tr _ngcontent-c4=””> <td _ngcontent-c4=”” class=”owner”>value</td> <td _ngcontent-c4=”” class=”name”></td> <td _ngcontent-c4=”” class=”name”></td> <td _ngcontent-c4=”” class=”status”>kasutusel</td> <td _ngcontent-c4=”” class=”approval-status”>some value/td> <td _ngcontent-c4=”” class=”topics”>some value</td> <td _ngcontent-c4=”” class=”last-modified text-nowrap”>table value</td> </tr> </tbody> </table> And I can’t […]

how to select a drop down value of angular js application using selenium(java) using text

Please see the html source Below is myfunction to select a value from dropdown of angular js application public String dropdownwithstringselect(String locatorName1,String locatorName2,String strtext) { try { wait(2); waitForElement(locatorName1); String locatorValueFromXML1 = utils.getLocatorData(locatorName1); WebElement sourceElement = driver.findElement(getElement(locatorValueFromXML1)); sourceElement.click(); String locatorValueFromXML2 = utils.getLocatorData(locatorName2); WebElement sourceElement1 = driver.findElement(getElement(locatorValueFromXML2)); sourceElement1.getAttribute(strtext); extentTest.get().pass(“Attribute value fetched from ” + locatorName1); } catch (Exception e) { extentTest.get().fail(“Element – ” + locatorName1 + ” was not found”); takeScreenShot(); } return strtext; } Source: […]

Using Selenium on Apache NiFi

Has anyone automated Apache NiFi using Selenium? I can’t seem to find helpful guides that, its seems like a challenges because I believe its built using AngularJS and waiting for the elements to load is challenging when the GUI is not consistent. My main objective is to take screenshots on every processor down the line and outputs then later validate them, the struggle is the element load time (I like Java, not sure if going […]

Strategies to write protractor end to end tests without browser.wait()

I would like to have different strategies to write Protractor End to End tests without browser.wait() . The default timeout in protractor.conf.js is defaultTimeoutInterval: 30000. If i eliminate browser.wait(), all the tests are failing. For Example, i have the below method in a pageobject: waitForElement(elem) { const EC = protractor.ExpectedConditions; const isVisible = EC.visibilityOf(elem); browser.wait(isVisible, 8000); } When i remove browser.wait from this method, it fails for all referenced test cases stating No element found […]

Next Page »