automated-tests

Selenium/Cucumber tests not running in Maven

三世轮回 提交于 2019-12-11 19:06:04
问题 Trying to run my Selenium/Cucumber tests through TestNG in Maven with commands like mvn test , mvn install , etc. however, the tests are not running If I run in RunAs TestNG in my Eclipse , all tests are executed normally. POM.XML <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>br.me.cucumber<

Is it possible for WebDriver to click an element with a mouseclick event that invokes a JavaScript file that includes a test tracker?

╄→гoц情女王★ 提交于 2019-12-11 17:20:03
问题 This is a question I have that arises from another user's question. If you look at my answer there, you will get some context for this question. The URL for the web page I am going to is https://hotels.ctrip.com/hotel/347422.html?isFull=F#ctm_ref=hod_sr_lst_dl_n_1_8 if you want to check it out for yourself. Consider the python selenium script found at the bottom of the question. Nothing happens when selenium tries to click on this element: browser.find_element_by_xpath('//*[@id="cPageBtn"]')

How to delete data only after all tests, based on inputs from data provider, are run?

我怕爱的太早我们不能终老 提交于 2019-12-11 16:56:26
问题 I've a test with different inputs, hence used @DataProvider but before inputs, from Object[][] , passed to a test, I want to create some data which is common to test with all different inputs @DataProvider(name = "test") public Object[][] createData() { //create some data which is common for both john and bob return new Object[][] { { "john" }, { "bob" } }; } @Test(dataProvider = "test") public void userOp(String name) { //Perform some operations with user mention in `name`. For now let's

How to export Sikuli scripts to java?

♀尐吖头ヾ 提交于 2019-12-11 16:48:13
问题 I am new to automation and have to use Sikuli, can you all tell me how to export Sikuli script in java also is it possible to integrate those scripts with Selenium.... Thanks in advance..... 回答1: "export" scripts to Java is not possible in this sense, since Sikuli scripts are written in Python scripting language and the scripts itself are run using the Jython interpreter (Java base implementation of Python language). But since the the essential Sikuli features are implemented using Java, you

Using Selenium, is there another, more reliable, way to use click command on an element in Headless Chrome?

自作多情 提交于 2019-12-11 16:39:37
问题 After 2 days of struggling with an erratic click() command issue in Headless Chrome - in my case an Anchor (a) element with a href tag - and going through various threads advice about chromeOptions (--start-maximized, --window-size, etc...), and trying 12 different ways ( with sendKeys and Actions, and even submit() ) to work around the click() with no success... Using ChromeDriver 77.0, Chrome 77.0.3865.75 and Selenium 3.141.59, my tests are stable in Chrome and they're unstable in Headless

Laravel Dusk junit doesn't log to file

耗尽温柔 提交于 2019-12-11 16:38:14
问题 I've written some automated tests using Laravel Dusk and when I run them I get some errors, however I can't seem to scroll through the whole output. First I tried to pipe the output to less but less doesn't work properly for some reason. Then I tried doing: php artisan dusk --log-junit /path/to/log/file.log however the log file keeps empty for some reason. The teamcity version of the log works but there the errors are not described. Also, when I run only the basic test, which comes with Dusk,

Protractor>Package.json configuration> Cannot find .bin folder in my mac book

假如想象 提交于 2019-12-11 15:58:02
问题 I'm creating a protractor project and I need to set up the dependencies in the npm package.json On my course my trainer has a window machine, I have a mac book and I am having problems finding the .bin folder so I can find the correct node to start protractor I did cd/documents/ls/cd JSworkspace/ls/my_project/ls/node_modules/ls I was expecting to find the .bin folder ....but I can't find it anywhere. I don't know where to find the .bin folder and I would really appreciate your help. As I am

XCUITest Class teardown isnt deleting the app. But works if its instance teardown. What am I doing wrong?

无人久伴 提交于 2019-12-11 15:50:06
问题 I have a class teardown which is trying to remove the app, but it doesn't recognize app.terminate(). class DeviceSettingsUtilities : UITestUtilities { func removeApp(productName:String){ print("in teardown") let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard") XCUIApplication().terminate() // this does nothing XCUIApplication(bundleIdentifier: "com.xxx.xxxx").terminate()//this does nothing too, but this works when called as an instance teardown sleep(5) springboard

SpecFlow Parallel and non Parallel tests

时光怂恿深爱的人放手 提交于 2019-12-11 15:28:07
问题 I'm using SpecFlow to automate my web tests and using parallel execution to speed them up. The issue i have is that one test which checks that invalid passwords are rejected will lock the user account if run 3 times without a successful login. I've set them up to perform a successful login afterwards however running in parallel means against multiple targets they are ran at the same time and still lock the account. Is there a way I can set just this test to not run in parallel so it doesn't

UiDevice class missing from UIAutomator 2.1.2

淺唱寂寞╮ 提交于 2019-12-11 15:15:20
问题 I found that "upgrading" my reference to UIAutomator in build.gradle to 2.1.2 broke any references I had to the UiDevice class. In fact, a lot seems to have changed but I'm finding nothing explaining it. Can anyone shed some light on what is (apparently) about to change? This works: androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1' This does not: androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2' Dependencies from build.gradle follow