Search Posts

Category: selenium

How to click on checkbox which is angular UI Grid based on its row item in selenium C#

I am automating angular application using selenium C#.I am facing an issue with selecting a checkbox based on the row text value.If it is “X” I want to select on the particular checkbox corresponding to that item. I have two seperate lists for the items and the checkboxs.And the checkbox count and items count are not matching because of checkbox itself has sub folders. My Code for Items: List<IWebElement> Down = driver.FindElements(By.XPath(“//div[@class=’ui-grid-cell-contents ng-binding’]”)).ToList(); int numberOfElements […]

Tags not visible on page load

Python automated script opens the ‘CONFIG’ tab and then clicks on ‘ONU STATUS’ tab to fetch the content of ONU status. The content takes few seconds to appear on the page. To handle this situation we have a method called ‘any_condition_wait’ which waits for ‘md-card-content’ angular tab to be visible within 20s and the fetches the content within the tag. The program fails with a Timeout Exception as the tag is not visible. What can […]

Unable to select all the items in the UI-Grid selenium C#

I am able to select the first checkbox in the UI-Grid and the selecting of all the items at a a time or looping throgh the list is not happnening,But when I debug the code and verified the click works on all the items in the list. IList elements = driver.FindElements( By.XPath(“//div[@ng-click=’selectButtonClick(row, $event)’]”)).ToList(); int numberOfElements=elements.Count(); var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(ExpectedConditions.ElementToBeClickable( By.XPath(“//div[@ng-click=’selectButtonClick(row, $event)’]”))).Click(); for (int i = 0; i < numberOfElements; i++) { elements […]

karma / selenium error – trying to access: http://:9876/?id=77115711

I ran karma start I am getting this: INFO [karma]: Karma v1.7.1 server started at INFO [launcher]: Launching browser selenium_chrome with concurrency 5 INFO [launcher]: Starting browser chrome via Remote WebDriver ERROR [karma]: {“message”:”[get(“http://:9876/?id=77115711”)] Error response status: 13, UnknownError – An unknown server-side error occurred while processing the command. Selenium error: unknown error: unhandled inspector error: {“code”:-32000,”message”:”Cannot navigate to invalid URL”}n (Session info: chrome=63.0.3239.84)n (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The […]

Selenium selector doesn’t work

I’m trying to scrape the following page made with AngularJs (i think) but it doesn’t work when i try to select and then click on the link named “Learn more” (at the end of the following code). I don’t know what the problem is, could you help me ? <article class=”tactic”> <div class=”tactic__info”> <header class=”tactic__header”> <div class=”tactic__category label-text label-text–small”> <!—-> <!—-> Traffic </div> <h5 class=”formatted-text tactic__name” ng-bind-html=”$”>Video Retargeting Audience</h5> <div class=”tactic__tags”> <tags-display tags=”$ctrl.tags” on-tag-click=”$ctrl.searchByTag”><!—-><span ng-repeat=”tag […]

Protractor hangs at "Selenium standalone server started "

My team recently switched from starting the webdriver-manager manually, to specifying the selenium server in the conf.js file, as specified here: I’m trying to run Protractor with the following conf.js, which takes a few arguments and then returns a configuration object: //create-conf.js ‘use strict’; const path = require(‘path’); const globalData = require(‘./globalData’); module.exports = (confLocation, specs, reportDirName, browserName = ‘chrome’) => { // We want the reports to be saved relative to the config, […]

AngularJS- synchronisation within automated testing?

I am developing a suite of automated tests for an AngularJS application using Protractor, and am having a bit of trouble with the test that I am currently writing: The purpose of the test is to click one of the menu items, and check that it redirects the user to the correct page. This particular criteria does currently pass, however, I need this test to perform one other action before it can complete- the page […]

Moving Protractor tests to async/await (leaving selenium control flow)

I want to move appart from the selenium control flow in my Protractor tests. Here are the steps and problems I went through so far: 1. Disable it test by test My first idea was to use SELENIUM_PROMISE_MANAGER in order to move from selenium promises to async/await code. Unfortunately, I found no way to put one test to SELENIUM_PROMISE_MANAGER=0 while keeping others to SELENIUM_PROMISE_MANAGER=1 in order to do the migration smoothly. 2. Keep it but […]

JavascriptExecutor is not working with AngularJS forms

I am trying to automate a login form by Selenium Webdriver (JavascriptExecutor) which is built in AngularJS. The script is entering data in textbox; but when submit button is clicked error message shows that textbox is not filled. I have also used events like onkeyup(), blur(); but error shows these are not functions. Textbox validation works fine with sendkeys() and it takes time; but facing issue when JavascriptExecutor is used. html code: <input id=”email” […]

Next Page »