Development

Im currently working on a platform that has multi-language options and also the language is defined by IP. So Im trying to build an architecture for testing both scenarios dynamically… The domain is always the same: Example: www.page.com (If you are logged in from Britain the web application is loaded in English, if you are visiting the page from France the page is loaded in French.)
I have an idea to make different abstract classes with error messages for example:
public class ErrorMessagesEN {

public static final String MANDATORY_FIELD = “This field is mandatory…”;
public static final String SOME_OTHER_ERROR_MSG = “Some error message on english”

// etc…..

}

public class ErrorMessagesFR {

public static final String MANDATORY_FIELD = “Error message in French”
public static final String SOME_OTHER_ERROR_MSG = “Some error message on
French”

// etc…..
}

In the test method i provide parameter “EN” or “FR” for example:
homepage.signIn(String location)

So is there any option to make for example:
if (location==”EN”) {
// load the ErrorMessageEN
// etc……
}

The keys for the Strings are the same but the classes are different, so how can I provide different imports of the classes by the location parameter for example? Or are there any better approaches for this situation? Any links or ideas?
Thanks!
PS. If you need more info to help me please ask! 🙂

I’m building a selenium test using a POM, and I have a List of Webelements (companyNames in SelectAccountPage) that keeps throwing a UninitializedPropertyAccessException.
Here’s the Page Object
class SelectAccountPage(driver: WebDriver) {

@FindBy(css = “header h2”)
lateinit var selectAccountTitle: WebElement

@FindBy(css = “div[class*=’company-picker’] h3”)
lateinit var companyNames: List<WebElement>

init {
PageFactory.initElements(driver, this)
}

fun pickCompany(companyToSelect: String) {
for (company in companyNames) {
if (company.text == companyToSelect) {
company.click()
}
}
}

and the test
class SignInTest : TestBase() {

lateinit var signInPage: SignInPage
lateinit var forgotPasswordPage: ForgotPasswordPage
lateinit var selectAccountPage: SelectAccountPage

@BeforeTest
fun initPageObjects() {
signInPage = SignInPage(driver)
forgotPasswordPage = ForgotPasswordPage(driver)
selectAccountPage = SelectAccountPage(driver)
assert = SoftAssert()
}

@Test(priority = 3)
fun validCredentials() {
driver.get(signInPage.url)
signInPage.sendCredentials(Config.getUser(), Config.getPassword())
assert.assertTrue(driver.currentUrl.contains(“app”))
selectAccountPage.pickCompany(“Generic”)
assert.assertAll()
}

I’m not sure what’s going on here because the Webelement on the same page is initialized just fine. Is there something specific that needs to be done when initializing Lists?

Build Verification Testing (BVT) is an important step in software development. It helps ensure that the newest build of the software is stable and functions as expected before moving on to further testing. Often called “smoke testing” or “build acceptance testing,” BVT focuses on checking the essential features of the software quickly. This process helps…
The post Build Verification Testing (BVT Testing) – A Quick Guide to Ensure Quality Software Releases appeared first on Software Testing Material.

Robotic Process Automation in Finance – Transforming the Industry How does Implementing RPA in Finance help Overcome these Challenges? Some Key Use Cases of Robotic Process Automation in Finance How to Deploy RPA in Banking & Finance Conclusion When it comes to the potential use cases for Robotic Process Automation (RPA), many things may come … Continue reading “Robotic Process Automation in Finance – What’s the Buzz and Why Should You Care”
The post Robotic Process Automation in Finance – What’s the Buzz and Why Should You Care first appeared on TestingXperts.