automated-tests

How to ignore Get Table Text from Cell, if xpath of cell not match

孤人 提交于 2019-12-13 13:58:05
问题 How to ignore Get Table Text from Cell, if xpath of cell not match ? Becuase i want my test case still continues testing . ${tableFinal} Set Variable xpath=/html/body/div[2]/div[3]/div/form/table[3] ${totalPayAmount} Get Table Text from Cell ${tableFinal} 1 2 Thanks you 回答1: Using either Run Keyword And Continue On Failure or Run Keyword And Ignore Error can help with this. In the documentation the entire family of Run Keyword .... keywords. The difference between the two is that one just

Python Telnetlib read_until '#' or '>', multiple string determination?

瘦欲@ 提交于 2019-12-13 13:45:16
问题 if (tn.read_until('>')): action1 else: action2 or if (tn.read_until() == '>'): action1 else: action2 I just want the read_until() to check which desired String comes first, and do different actions. Or is there any equivalent ways? 回答1: Look at the docs. Read until wants the expected string as a positional argument and an optional timeout. I would do it like this: >>> try: ... response = tn.read_until(">", timeout=120) #or whatever timeout you choose. ... except EOFError as e: ... print

How to get the testCafe exit code

馋奶兔 提交于 2019-12-13 13:41:56
问题 I am having an issue running Testcafe through cucumber. for whatever reason, When I run testCafe through cucumber, the process will always exit with exit code 0 even in the test fails. If I run puppeteer through cucumber I don't get this issue. I am thinking that this behavior is due to the way I have things set up in my hooks file where I am not properly interpreting the test cafe exit code. In my hooks file, I am creating a testCafe runner and in my Before hook and then closing it during my

How should I go about testing a monolithic executable package?

依然范特西╮ 提交于 2019-12-13 12:31:10
问题 I have a monolithic executable package with several modules. (What I mean by "monolithic" is that it only has one clause in its cabal file, and that is executable .) It is currently tested with shell scripts, in a black box manner. I thought I would like to write unit tests for some individual functions, but cabal does not agree: % cabal new-test cabal: Cannot test the package x-0.0.0.0 because none of the components are available to build: the test suite 'x-test' is not available because the

How do I generate the source code to create an object I'm debugging?

扶醉桌前 提交于 2019-12-13 12:05:09
问题 Typical scenario for me: The legacy code I work on has a bug that only a client in production is having I attach a debugger and figure out how to reproduce the issue on their system given their input. But, I don't know why the error is happening yet. Now I want to write an automated test on my local system to try and reproduce then fix the bug That last step is really hard. The input can be very complex and have a lot of data to it. Creating the input by hand (eg: P p = new P(); p.setX("x");

How do I use an array I've created within my Test file

纵饮孤独 提交于 2019-12-13 11:15:07
问题 So I have created a js array for a list of postcodes. The array is as below in the code: - //postcode.js file var postcode = [ "b28 8ND", "b49 6BD", "b28 0ST", "b31 4SU", "B92 9AH", ]; What I need to do is in my test randomly select a postcode for this js file to enter into a text field when running my automation tests. How do I go about doing this? An example would be much appreciated as I can't find much on the internet & I'm quite new to TestCafe & javascript. Below is what I have in my

Appium Test Android

江枫思渺然 提交于 2019-12-13 09:47:03
问题 Automating Test using Appium I am Following This Two Tutorials https://www.youtube.com/watch?v=n8QqYAXKWEU https://www.youtube.com/watch?v=AlBrQ_-phsQ org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures. at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:358) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal

Javascript Protractor - Seeing outside functions as undefined

大城市里の小女人 提交于 2019-12-13 08:58:53
问题 In specs/Test.js is a test definition: "regex2" In pages/TablePage.js is a page object in regex2 there is a try to use a function from TablePage.js it('regex2', function(){ table_page.matchPriceRegex(table_page.workingBalanceField) }); it is saying table_page.matchPriceRegex is not a function The function itself from TablePage.js: var TablePage = (function () { function TablePage() { this.workingBalanceField = element(By.xpath('//*[@id="root"]/main/section/div/div/div[5]/div/div[1]')); }

Selenium Node/Hub Authentication

痴心易碎 提交于 2019-12-13 08:40:12
问题 I am trying to stop a selenium hub registering a node by implementing a custom proxy. I have some code that works for a custom proxy. However, the client can get round this by not specifying the custom proxy in its configuration. Is there a way we can force the node to use the custom proxy and not to use DefaultRemoteProxy. Or is there something I can implement within the Selenium Project to authenticate a node with the selenium hub? 回答1: There's no elegant way of doing this. Here's a dirty

Unable to click on 'Add' button in GUI (Error: Other element would receive the click)

∥☆過路亽.° 提交于 2019-12-13 08:37:59
问题 I am trying to click on 'Add' button but I am getting the following error message: Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Element <img src="theme/catalogSiemens/images/btn/btnBackCatalog.png" alt="Zurück" title="Zurück"> is not clickable at point (53, 57). Other element would receive the click: <div id="updateIndicator" class="waitVisible"></div> (Session info: chrome=58.0.3029.110) (Driver info: chromedriver=2.29.461591