automated-tests

TestNG “getCurrentXmlTest()).getAllParameters()” API using very old testng-5.4-jdk15.jar TestNG library

时间秒杀一切 提交于 2019-12-12 03:28:02
问题 For some reason I have to use old TestNG library which doesn't have "getCurrentXmlTest()).getAllParameters()" API How should I get all TestXML parameter using testng-5.4-jdk15.jar For latest TestNG version, this is how we get all params but how can I simulate such a code using testng-5.4-jdk15.jar @DataProvider(name = "DataFile") public Object[][] testdata(ITestContext context) { Map<String, String> parameters = (((ITestContext)context).getCurrentXmlTest()) .getAllParameters(); return new

How do the arguments are being passed to test functions in tox/py.test?

女生的网名这么多〃 提交于 2019-12-12 02:07:50
问题 I'm learning to write tests with tox. How do the arguments are being passed to test functions in tox/py.test? For example in test_simple_backup_generation from tests/test_backup_cmd.py of django-backup extension there are three arguments tmpdir , settings , db . I don't have any idea where they came from. It's nothing said about this in tox documentation either. 回答1: These are pytest fixtures provided by pytest-django and pytest itself. 来源: https://stackoverflow.com/questions/39018056/how-do

AndroidViewClient dump animated view

大憨熊 提交于 2019-12-12 01:53:23
问题 One of the view is constantly refreshing (a SeekBar for music progress) When I try to make a dump, I got this error: RuntimeError: The views are being refreshed too frequently to dump. Is it possible to freeze the app while the dump is not finished, or something similar? 回答1: This is a uiautomator limitation. You may try using ViewServer as the backend as it works in most cases, however you would need a rooted device or access to the application source code as described in https://github.com

Determine Current Visual Studio 2013 Test Agent Version

妖精的绣舞 提交于 2019-12-12 00:46:54
问题 We are using TFS 2015 and we are trying to run build definition on a remote server with a test agent. TFS complains that our test agent version is too old: No agent found in pool 1 which satisfies the specified demands: Agent.Version -gtVersion 1.94.0 The question is: how can you tell the current version of the agent? 回答1: You can see it on the Agent pools pagein TFS under Capabilities. 来源: https://stackoverflow.com/questions/38667507/determine-current-visual-studio-2013-test-agent-version

Actionchains perform not working when driver loses focus

萝らか妹 提交于 2019-12-11 23:45:45
问题 I have a code that basically triggers a browser shortcut using actionchains. I'm using Chrome driver 2.27 and running python 3.6 through Jupyter notebook(though that shouldn't matter). The problem is that if the code runs along with the creation of the webdriver instance it works and shows the download bar. Instead if I run the code to create the webdriver, open the new window, minimize it and then try running the code to trigger the shortcut it doesn't work. I'm guessing it has something to

how to select an element from autoselect drop down in GoIbibo from city field using selenium webdriver java

雨燕双飞 提交于 2019-12-11 21:36:33
问题 I was trying to automate flight booking in GoIbibo using selenium webdriver java. When we enter the value "from city", a list is displayed as autosuggestion. But am not able to detect the elements in the autosuggestion using xpath. Also not able to find the exact xpath or id for the list displayed since am not able to inspect the list. I have used the below code to find the elements displayed but this is also not working. driver.findElement(By.id("gosuggest_inputSrc")).sendKeys("Dublin (DUB)"

Could not find load main class GridLauncher for selendroid grid

不打扰是莪最后的温柔 提交于 2019-12-11 20:28:08
问题 I want to test my native android app parallelly using Selenium grid .Is there any option to do the same in Selenium grid or in selendroid. I tried steps mentioned in selendroid.io/scale.html and i encounter below mentioned error. Error D:\mobile-test\selendroid grid>java -Dfile.encoding=UTF-8 -cp "selendroid-grid-plugin-0.17.0.jar:selenium-server-standalone-2.45.0.jar" org.openqa.grid.selenium.GridLauncher -capabilityMatcher io.selendroid.grid.SelendroidCapabilityMatcher -role hub -host 127.0

how to impersonate a windows domain user for automated web testing?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 19:49:50
问题 we are about to build several UI test with selenium-rc and the java client the app itself is a classic asp web application that uses integrated security to retrieve the user's permissions from a database, and then, according to those permissions, displays a menu with the appropiate options. we'd like to automate that test, something like if the logged user is domain/user_test then optionx shoulb be enabled ... is there some way to programatically impersonate a domain account, so that

HTMLUnit with FIddler and SSL

久未见 提交于 2019-12-11 19:15:42
问题 I configured HTMLUnit so it uses Fiddler as a proxy. But when Fiddler is capturing traffic and I browse a site which has ssl(https) I get the following error in Java "javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated" Is there anyway fix around this? I want to see all SSL traffic in Fiddler. Regards! 回答1: You need to configure Java to trust Fiddler's root certificate, which you can export from Fiddler using the Tools > Fiddler Options > HTTPS > Export Root Certificate button.

How to type text by cypress cy.type in <ion-input> Input type?

老子叫甜甜 提交于 2019-12-11 19:08:33
问题 < ion-input data-cy="email" type="email" class="border" placeholder="EMAIL"> If I do var typedText = 'test@email.com' cy.get('[data-cy=email]') .type(typedText,{ force: true }) .should('have.value',typedText) the test run shows error like CypressError: cy.type() failed because it requires a valid typeable element. 回答1: var typedText = 'test@email.com' cy.get('[data-cy=type-email]>[data-cy=type-email]') .type(typedText) .should('have.value',typedText) OR var typedText = 'test@email.com' cy.get