automated-tests

StaleElementReferenceException: Element is no longer attached to the DOM: Selenium

不羁岁月 提交于 2019-12-21 17:47:07
问题 I am completely new to automation testing. After referring some tutorials, I have created an automated test case. The test case I try to automate is to check whether the sorting worked correctly after I click on one of the headers of a table. My automated test case fails with the following exception: org.openqa.selenium.StaleElementReferenceException: Element is no longer attached to the DOM Command duration or timeout: 12 milliseconds For documentation on this error, please visit: http:/

Unhandled error “Cannot find context with specified id” using Robot framework

我们两清 提交于 2019-12-21 16:34:10
问题 I have a problem when working with iframe using Robot framework and Selenium2Library. It throws error: WebDriverException: Message: unknown error: unhandled inspector error: {"code":- 32000,"message":"Cannot find context with specified id"} (Session info: chrome=55.0.2883.87) (Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed),platform=Windows NT 6.1.7601 SP1 x86_64) My test code is: Fill In Description ${description} Wait Until Element Is Visible ${FRAME} 40

SQLite's test code to production code ratio

拈花ヽ惹草 提交于 2019-12-21 12:19:49
问题 SQLite claim to have 679 times more test code than production one. http://www.sqlite.org/testing.html Does anyone knows how it is possible? Do they generate any test code automatically? What are the major parts of these "45678.3 KSLOC" of test code? 回答1: "Does anyone knows how it is possible?" "It is possible" to have 679 times as much test code because a single feature can be used in many different ways. Consider just a single function that takes two parameters. I can generate alot of test

How can a test called by Robot Framework return information to the console

人走茶凉 提交于 2019-12-21 09:13:46
问题 I have a robot framework test suite that calls a python method. I would like that python method to return a message to the console without failing the test. Specifically I am trying to time a process. I can use "raise" to return a message to the console, but that simultaneously fails the test. def doSomething(self, testCFG={}): ''' Do a process and time it. ''' testCFG['operation'] = 'doSomething' startTime = time.time() response=self.Engine(testCFG) endTime = time.time() duration = int(round

How to Zoom in or Zoom out in a webpage while using UFT/QTP

為{幸葍}努か 提交于 2019-12-21 06:04:13
问题 I would like to control the zoom in and out feature of my webpage of the application under test using UFT. This is required as the zoom level changes dynamically and it becomes difficult to identify the objects. I have found a code but it is useful if you need to change the zoom level at one instance or at the start. below is the code Function ChangeIEZoom Dim intZoomLevel, objIE intZoomLevel = 110 Const OLECMDID_OPTICAL_ZOOM = 63 Const OLECMDEXECOPT_DONTPROMPTUSER = 2 Set objIE =

Configuring Rational Functional Tester (RFT) to run in Hudson/Jenkins

百般思念 提交于 2019-12-21 05:46:14
问题 I've just installed Hudson and it is running beautifully. It builds, runs JUnit-tests and also CheckStyle analysis. Next step for us would be to create an installation, install it and then run automated tests on the actual installation. I would then like to fail the build if the tests fail or at least publish the results somehow. I think we would set it up so that part runs periodically or manually triggered. We use InstallAnywhere for installation and IBM Rational Functional Tester for

Can't see .Net Core bitbucket pipelines test results

假装没事ソ 提交于 2019-12-21 05:45:31
问题 I finally managed to make reports of my tests in bitbucket pipeline by this command: - dotnet test MyTests --logger "trx;LogFileName=test-reports/results.xml" Build Teardown says: Found matching test report file MyPath/test-reports/results.xml Finished scanning for test reports. Found 1 test report files. Merged test suites, total number tests is 0, with 0 failures and 0 errors. However, I can't see these test results file in bitbucket. I know that there should be a new tab in pipeline window

Running Selenium tests in Jenkins

本秂侑毒 提交于 2019-12-21 05:24:12
问题 I have recorded some simple selenium tests by Selenium IDE. Now I want to run those tests in Jenkins. Which plugin to Jenkins do I need to do that? And how to run the tests step by step? Help is appreciated. 回答1: you can use recorded selenium IDE script and selenium-server.jar file to run it from Jenkins Here is steps: Go to SeleniumHQ page and download Selenium Server file Eg: selenium-server-standalone-2.33.0.jar Repair html test suite Use Selenium IDE to record then save as html test case

Dependent tests in rspec

微笑、不失礼 提交于 2019-12-21 04:13:25
问题 I write functional tests, and I need to do tests that were being would depend on the passage of previous tests. Let's say I have a button that opens a window in which there is a functional. That is, in order to check this functionality, I need to first check the correct operation of the button (ie, open window or not functional). So, I need to do so that would be if the test failed on a button click, the tests did not run to check the functional window. Writing tests separately - for me is

PhantomJS and clicking a form button

好久不见. 提交于 2019-12-21 01:58:05
问题 I have a very simple HTML form that I'm attempting to test with various kinds of data. I wrote a prototype proof-of-concept in MS Access/VBA using the IE object. It worked fine but the finished testing product has to use PhantomJS. I've got the page-interfacing to work and the form is populating just fine. Where I'm stuck is getting the submit button to fire. I've combed through S.O. and tried all suggestions and nothing is working. I'm using PhantomJS 1.9.7 and using straight JavaScript test