Hi I'm using your project https://github.com/rajatt95/MasterAppiumFramework_BDD for testing but I want to modify it so it resets the app and driver after every test instead of every class. How can I accomplish this?
Related
I need some help.
I'm running some Selenium test into our CI pipeline (we use travis).
One of my test failed only on the CI, on my local machine everything is fine.
I get this error message:
org.openqa.selenium.ElementNotInteractableException: element not interactable
My test click on an input and just sendkey the new time
wait.waitForLoading();
WebElement start = driver.findElement(By.xpath("//*[#data-testid='keyboardTimePicker.dailyStartTime']//input"));
start.click();
start.sendKeys(startime);
on this part we have also the possibility to use a clock picker but I prefer to send the time into the input.
But on this specific part on the CI it's open the clock picker, no the one from desktop version but the one from mobile version, it's like on the CI it's thinking we are in the mobile version (maybe because we don't have cursor?). The window is opened in fullscreen and I tried also with specific size but nothing change.
Do we have some possibility to force desktop version?
Hi can anyone help me why this is happening i have no idea, for my appium mobile test scripts for MAC iPad app, when I i use IOSDriver() it is not working giving me multiple errors such as randomly, sometimes session cannot b created, or no element found, etc., and the same code when I run with RemoteWebDriver() it is working fine and executing all my test cases.
I am setting up my Appium/TestNG script in java on AWS Device Farm, using the tutorial: http://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-android-appium-java-testng.html
After I compile and upload the 'zip-with-dependencies.zip' to AWS Device Farm and run the tests on a device, I get an error, that the first clickable element in the script could not be found.
So the Setup and Teardown suite are passing in the run, but the actual test fails every time:
Failure Description on AWS Device Farm
My question is am I missing something from the configuration or is the script in need of any extra desired capabilities in order to actually execute the test on AWS Device Farm?
I changed the version of the tested app with another one, seems like the previous one, where the element could not be found was popping out an android system message, which could not be clicked with the provided code, hence the searched element could not be found.
Another thing that device farm is not so good at - providing real time observations on the running tests, which could save a lot of time in this situations.
Answering this for people who are still facing this issue.
You have to set up the automationName desired capability to the automation mechanism that you are using to automate the tests.
For me setting it up to uiautomator2 works.
capabilities.setCapability("automationName", "uiautomator2");
Two suggestions:
1. Set element waiting time to be less than 60 seconds, because default Appium session will timeout after that.
2. Create a screenshot for the failure, check whether the element was loaded correctly.
Hope this would help:)
Thanks,
Hongda
I have recently started using Selenium, and while it works very well I am stuck with what I thought would be a very simple step. I would like to be able to run a method if a user closes the Webdriver (Right now it just crashes and leaves all my temp files intact.) I know If I was using a JFrame I could just add a WindowListener, does anyone know if a similar thing exists for Selenium WebDrivers?
Thanks
I am using JUnit to execute my tests and it has TestWatcher class that you could extend. So you can possibly #Override the starting, finished, failed and succeeded methods to take appropriate action.
I can run a single selenium test in play's browser UI, however, is it possible to execute a play selenium test on the command line?
Obviously if I run play auto-test it will execute all my selenium tests (as well as my junit tests). Is there a way that I could tell Play to execute just a single selenium test on the command line to check whether it works using the headless browser?
I don't think it's possible to do so with the current play framework,
but see how auto-test works on
https://github.com/playframework/play/blob/master/modules/testrunner/src/play/modules/testrunner/FirePhoque.java .
It get the play test lists on /#tests.list , maybe you could try to override it providing what you want to test.
Anyway, I don't see the usecase of testing only one test in a headless browser.