-
Notifications
You must be signed in to change notification settings - Fork 24k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented selenium automation tests for all functionalities #1533
base: main
Are you sure you want to change the base?
Conversation
@TodorovskiMarko Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@TodorovskiMarko Thank you for signing the Contributor License Agreement! |
Is it necessary to add TestNG in order to have Selenium tests? If not, would it be better to stick with JUnit, the same as the rest of the project? |
…so that all tests are independent
Yes, you are right, I reimplemented it. While I was learning Selenium, I used TestNG and was familiar with it, so that's why I initially used it on this project. |
I have some suggestions: Change the isPetNameDisplayed function in OwnerPage to something like: public boolean isPetNameDisplayed(String petName) {
// FIX: petDetailsText need to be a list of string and not a normal String
List<WebElement> petDetails = driver.findElements(petDetailsClass);
List<String> petDetailsText = new ArrayList<>(petDetails.size());
for (WebElement petItem : petDetails) {
petDetailsText.add(petItem.getText());
}
String expectedPetName = input.getProperty(petName);
for (String petDetailsItem : petDetailsText) {
if (petDetailsItem.contains(expectedPetName))
return true;
}
return false;
} driver.findElements(petDetailsClass) returns a list of elements, not 1 |
Thanks. Can you make sure to run the build locally to check for failures? It just needs a formatter to be applied I think. |
…ion, applied formatter with no issues
Thank you for the suggestions. I updated the driver options. For the isPetNameDisplayed function, I used Java Streams to make the code more concise and readable. |
I've applied the formatter. The build was successful. |
is this still actual? If any help needed, I might offer help. |
I left it open in case anyone wanted to see how it is done. No plans to merge, but you could help by rebasing and making sure it works on today’s main. |
Sounds good. Will check it out! |
No description provided.