automated-tests

Is unit testing a bad idea during beta/prototyping?

删除回忆录丶 提交于 2019-12-31 18:51:11
问题 A new project we began introduced a lot of new technologies we weren't so familiar with, and an architecture that we don't have a lot of practice in. In other words, the interfaces and interactions between service classes etc of what we're building are fairly volatile, even more so due to internal and customer feedback. Though I've always been frustrated by the ever-moving specification, I see this to some degree a necessary part of building something we've never built before - if we just

Pros/cons for using multiple locators per element in Selenium?

我是研究僧i 提交于 2019-12-31 17:45:14
问题 I am testing a website which is still in development. Often an element's id, class, text, or position in the DOM will change. And then the locator I've been using will no longer be able to find the element. But the features are still functioning properly. I don't want several tests to fail when there is no actual regression. So instead of having a single locator for each element, I have a collection of locators. public static final ArrayList<By> LOGIN_ANCHOR_LOCATORS = new ArrayList<By>();

How do you focus on new windows with selenium ide?

大憨熊 提交于 2019-12-31 10:42:38
问题 I am trying to use selenium ide to duplicate an action. The action is clicking on a link that open a new window. How do you make selenium ide focus on the new window instead of the other one? It has not been working for me. 回答1: Select Window For this you will need to use the selectWindow | windowName command. To go back to the main window from the other window then do selectWindow | null Arguments: * windowID - the JavaScript window ID of the window to select Selects a popup window using a

How do you focus on new windows with selenium ide?

吃可爱长大的小学妹 提交于 2019-12-31 10:42:33
问题 I am trying to use selenium ide to duplicate an action. The action is clicking on a link that open a new window. How do you make selenium ide focus on the new window instead of the other one? It has not been working for me. 回答1: Select Window For this you will need to use the selectWindow | windowName command. To go back to the main window from the other window then do selectWindow | null Arguments: * windowID - the JavaScript window ID of the window to select Selects a popup window using a

Python unittest passing arguments to parent test class

我的梦境 提交于 2019-12-31 04:50:15
问题 I have a parent test class named as basetestcase() This is inherited by all the test classes class BaseTestCase(unittest.TestCase): driver = None browser = read from command line operatingSystem = read from command line url = read from command line @classmethod def setUpClass(cls): """ SetUp to initialize webdriver session, pages and other needed objects Returns: None """ # Get webdriver instance # Browser should be read from the arguments if browser == "iexplorer": cls.driver = webdriver.Ie(

Selenium IDE: Get row count in table

情到浓时终转凉″ 提交于 2019-12-31 03:49:04
问题 How do I get the row count of a given table using the Selenium IDE? When I right click on my table, I can only assert/verify the following: Title Value Text Table Element Present with the target being //div[@id='reports']/div[n]` where `n` is the number of rows. 回答1: You want to use the storeXpathCount command. This takes two parameters which can be stored within the IDE Target and Value fields where the following parameters are, respectively: xpath : the xpath expression to evaluate

Choosing an automated testing tool

99封情书 提交于 2019-12-31 03:34:06
问题 My project is compatible only with Internet Explorer. I want the test scripts to get generated automatically as it is done in Selenium IDE. Can i use Selenium RC to test my application? I could not use Selenium IDE as it can be used only with Mozilla Firefox. 回答1: seleniumrc works with IE. You can specify the browser and the path to it within the config file. It can be easily integrated into night builds via ant. stick to writing the testcase in java. 回答2: Selenium RC and Selenium Grid are

How to set JMeter Vars from within WebDriver Sampler?

时光怂恿深爱的人放手 提交于 2019-12-31 02:55:07
问题 // I had previously used a CSS/JQuery extractor to get a URL from a page and add it to JMeter vars - accessing it here var pageURL = "${valueFromJmeterVars}"; // navigate to that url WDS.browser.get(pageURL); // selecting an element var button = wait.until(pkg.ExpectedConditions.visibilityOfElementLocated(pkg.By.cssSelector(buttonLocator))); // log desired boolean value to console, so I can confirm is as expected WDS.log.info('reserveASpotButton:' + reserveASpotButton.isEnabled()); // add my

Select OK button from N'th modal opened in testcafe

旧巷老猫 提交于 2019-12-31 02:02:15
问题 I open two modals in my testing, and I want to be able to click on the "OK" button in the second modal (the second selected element in the below html). My current code is : import { waitForReact } from 'testcafe-react-selectors'; import { Selector } from 'testcafe'; fixture `App tests` .page('http://localhost:3000/') .beforeEach(async () => { await waitForReact(); }); test('Can open and accept all pop ups', async t => { //open first modal await t .click('#LayerAddingPopUpButtonID'); //select

Not getting report of TestNG in ReportNG

心已入冬 提交于 2019-12-30 10:36:06
问题 I am executing testng in eclipse and I want generate the report in reportNG. For that I have inlcuded guice-3.0,reportng-1.1.3,velocity-dep-1.4 jar files and added listeners in xml file Also I have disable the default TestNG listener in eclipse. After all that I am not getting the report in ReportNG. What else I have to do? This is the xml code.... <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="Registration" verbose="1" preserve