automated-tests

Compare equality between two objects in NUnit

穿精又带淫゛_ 提交于 2019-12-17 04:16:08
问题 I'm trying to assert that one object is "equal" to another object. The objects are just instances of a class with a bunch of public properties. Is there an easy way to have NUnit assert equality based on the properties? This is my current solution but I think there may be something better: Assert.AreEqual(LeftObject.Property1, RightObject.Property1) Assert.AreEqual(LeftObject.Property2, RightObject.Property2) Assert.AreEqual(LeftObject.Property3, RightObject.Property3) ... Assert.AreEqual

How to run a test many times with data read from .csv file (data driving)

给你一囗甜甜゛ 提交于 2019-12-17 02:32:15
问题 I am trying to automate some testing for one of our web applications and I need to know how I can make my Coded UI project read data from a CSV file. Lets say I want to test a log in screen. My CSV file will contain a few user names and passwords. I want my Coded UI test to read these log in details and loop through them to run the test on each set of data. 回答1: The web has many tutorials on data driving Coded UI tests. The basic steps for data driving with a CSV file are as follows. Create

Webdriver to open a mail in Gmail

↘锁芯ラ 提交于 2019-12-14 00:15:42
问题 I have started using Webdriver to automate our testing which is 100% manual. In one of the use cases I need to click on a link sent to the user's inbox. I am facing problems with Gmail in this case. After logging in I am not able to figure out how to open a particular email. I know the email subject etc but I am unable use it to access the element. Gmail receives all its data as JSON and then build the entire page through js functions. So the webdriver is not able to access any of the

How can I run the same Coded UI test with multiple input files

删除回忆录丶 提交于 2019-12-13 21:33:55
问题 I am looking for a way to be able to run the same coded ui test class with different input files, e.g. I have a test with end to end flow in the app, I want to be able to run this test with two different users doing different workflows once inside the app. I do not want to run both the tests each time (This is possible with having two rows in the data input csv). I wasn't able to find a way of doing this so far. Any help/guidance is appreciated. 回答1: I can think of three possibilities. 1. You

“Element is not clickable at point” has the wrong co-ordinates

前提是你 提交于 2019-12-13 20:26:37
问题 I'm receiving this error while trying to use browser.click() with webdriver.io: Error: element click intercepted: Element <input type="text" class="form-control" id="nameInput" data-validate="true" data-required-error="Name is required." data-pattern-error="Invalid data entered for Name" pattern="^.*$" required="" maxlength="255" value="Some Other Name"> is not clickable at point (709, 483). Other element would receive the click: <div class="attribute-container col-sm-6">...</div> This is

How to use getEval() to verify the typeof of a variable in selenium

筅森魡賤 提交于 2019-12-13 18:13:53
问题 I want to do this in selenium: var variable = editors; if (typeof(variable) == "undefined") {}; but I am not entirely sure how to do it with the getEval() method. 回答1: Since you have not mentioned where editors is coming from I am going to assume that it is on the page. var win = this.browserbot.getUserWindow(); will give you access to window. selenium.getEval("var win = this.browserbot.getUserWindow();var variable = win.editors; typeof ( variable) === 'undefined';"); ****Edit from comment***

ScrollTo and ScrollToExact equivalent for webView in appium for android

僤鯓⒐⒋嵵緔 提交于 2019-12-13 16:08:19
问题 I am automating android app using appium (java). For scrolling on native components, I use scrollTo() and scrollToExact() methods. But in case of webView inside the app ; these methods are not working. UPDATE: I have tried these two methods also: public static void scrollNavigation(AppiumDriver<MobileElement> wd, String widID, String target, String direction) { JavascriptExecutor js = (JavascriptExecutor) wd; HashMap<String, String> swipeObject = new HashMap<String, String>(); swipeObject.put

Receiving error: Failed to connect to binary FirefoxBinary on port 7055

☆樱花仙子☆ 提交于 2019-12-13 15:22:41
问题 i'm using a maven project to run a selenium test but when i run the test file i'm reciving the error: Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055. It open a blank page of FF an then the Test Result throws the error: Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055; process output follows: e":true,"v":"1.0.5","st":1484790105743},"webcompat@mozilla.org":{"d":"C:\\Program

How can I click on a button using Selenium WebDriver with Java?

不想你离开。 提交于 2019-12-13 15:16:04
问题 The following is the HTML code for button: <span> <button class="buttonLargeAlt" onclick="javascript:submitCheckout(this.form);"type="submit">Checkout</button> </span> I tried driver.findElement(By.xpath("//span[contains(.,'Checkout')]")).click(); It is not working... Any other ideas? There are 2 buttons with same name on the page. 回答1: Try: //span/button[text()='Checkout' and @class='buttonLargeAlt'] or //span/button[text()='Checkout'][1] Also, if you know which of the 2 buttons you need to

Why does smallCheck's `Series` class have two types in the constructor?

梦想与她 提交于 2019-12-13 15:14:15
问题 This question is related to my other question about smallCheck 's Test.SmallCheck.Series class. When I try to define an instance of the class Serial in the following natural way (suggested to me by an answer by @tel to the above question), I get compiler errors: data Person = SnowWhite | Dwarf Int instance Serial Person where ... It turns out that Serial wants to have two arguments. This, in turn, necessitates a some compiler flags. The following works: {-# LANGUAGE FlexibleInstances,