Libraries & Frameworks

Vue 3 plugin to add keyboard shortcut keys to your project. Continue reading on Vue.js Feed » Source: Read More

I have some scripts which are running on Firefox browser. Here, the problem was, I am using driver.manage().window().maximize(); code to maximize the browser. It is working perfectly fine with Windows 7 environment but, coming to Windows 10 environment, after opening browser, window is set to some small size. Not sure why it is happening!
Please help me on this
NOTE: I am using latest firefox driver(gecko) and latest version of firefox browser.(In both Windows 7 and windows 10)

The test case is to check if the tooltip message shows.
My html code is as:
<td id=”pendingBalance” align=”right”>
<a onmouseover=”displayHelpPopup(this,arrHelp[20][0]);” onmouseout=”closePopup();” href=”#”>
<span class=”BoldFont”>$0.00</span>

When user moves mouse to $0.00 then tooltip shows some text.
Please help me with the solution to check that the tooltip is displaying with the correct message.

I have recorded the script and run test with 1 VU. Checked the response of the application by using developer tools and the response got in application side and response from the JMeter is same but manually open the Application in the browser the response getting is after 60 seconds but while running the script with 1 VU, Think Time is 5 to 7 seconds and pacing time 5 to 7 seconds, getting the response time is 2.400seconds.
I have attached all the script related screenshots.
Made changes to the script as per the below link but still issue is same
Manually Application Vs Jmeter reports differences
Could anyone please help me

I have a scenario where I 1st iframe (i.e parent iframe) which has one button on it and clicking on it another iframe gets open (child iframe). I am able to switch to Parent iframe but when I click on the button and tries to interact with Child iframe I’m not able to do it. Can you suggest what should be the better approach to get this type of scenarios working?
Here is my Script:
public class Iframe {

public static void main (String []args) throws InterruptedException {

System.setProperty(“webdriver.chrome.driver”, Constants.Chrome_Driver);

WebDriver driver = new ChromeDriver();

driver.manage().window().maximize();

driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

driver.get(“http://automation.cloudaccess.host/administrator”);

driver.findElement(By.id(“mod-login-username”)).sendKeys(“admin”);

driver.findElement(By.id(“mod-login-password”)).sendKeys(“admin@123”);

driver.findElement(By.id(“mod-login-password”)).submit();

driver.findElement(By.linkText(“Components”)).click();

Actions action = new Actions(driver);
action.moveToElement(driver.findElement(By.linkText(“Messaging”))).build().perform();

driver.findElement(By.linkText(“New Private Message”)).click();

driver.findElement(By.className(“wf-editor-header”)).click();

new WebDriverWait(driver, 20).until(ExpectedConditions.elementToBeClickable(By.xpath(“//button[@id=”jform_message_imgmanager”]”))).click();

new WebDriverWait(driver, 20).until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.xpath(“//iframe[contains(@src,’&plugin=imgmanager’)]”)));

new WebDriverWait(driver, 20).until(ExpectedConditions.elementToBeClickable(By.xpath(“//*[@id=”browser-actions”]/a[@id=”help”]”))).click();

new WebDriverWait(driver, 20).until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.xpath(“//iframe[@id=”mce_inlinepopups_50_ifr”]”)));

new WebDriverWait(driver, 20).until(ExpectedConditions.elementToBeClickable(By.xpath(“//*[@id=”imgmanager.insert”]/i[@class=”icon-file”]”))).click();

driver.quit();

}

}

Error in getting:
Exception in thread “main” org.openqa.selenium.TimeoutException: Expected condition failed: waiting for frame to be available: By.xpath: //iframe[@id=”mce_inlinepopups_50_ifr”] (tried for 20 second(s) with 500 milliseconds interval)
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:81)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:271)
at testScripts.Iframe.main(Iframe.java:53)
Caused by: org.openqa.selenium.NoSuchElementException: Cannot locate an element using By.xpath: //iframe[@id=”mce_inlinepopups_50_ifr”]
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: ‘3.12.0’, revision: ‘7c6e0b3’, time: ‘2018-05-08T15:15:08.936Z’
System info: host: ‘vowellt4’, ip: ‘127.0.1.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.15.0-24-generic’, java.version: ‘1.8.0_171’
Driver info: driver.version: unknown
at org.openqa.selenium.support.ui.ExpectedConditions.lambda$findElement$0(ExpectedConditions.java:896)
at java.util.Optional.orElseThrow(Optional.java:290)
at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:895)
at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:44)
at org.openqa.selenium.support.ui.ExpectedConditions$17.apply(ExpectedConditions.java:517)
at org.openqa.selenium.support.ui.ExpectedConditions$17.apply(ExpectedConditions.java:513)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:248)
… 1 more

I am using the WebDriverWait.Until() method in my script to wait for an element to disappear from the UI.
For this, there is the ExpectedConditions class and I could have used its InvisibilityOfElementLocated method, but it is now deprecated.
In my implementation of the WebDriverWait.Until() method, I am passing a Func delegate which has the wait logic defined inside it.
What I observe is that the exceptions, like NoSuchElementException is ignored(which I assume is due to the default whitelisted exceptions).
But I have not used the IgnoreExceptionTypes method to explicitly whitelist any exception.
I want the flow to break out of the Until method’s check(which kind of keeps looping until one of the below mentioned event occurs) once an exception like NoSuchElementException is encountered.

Kindly suggest.

Can you help me with some ideas on how to deal more efficent with test data used as precondition for automated api tests? I can’t use api calls for creating the data, so I would have to use sql scripts. However, as every test requires quite different test data(data to be inserted in 4,5 tables; more in some cases) I don’t know how to proceed to be efficient. I will try to group somehow tests that might use same data and only run the scripts once before that group of tests and delete them after(with @before class perhaps. What are your approaches when you can t use api calls and you have to deal with large data sets? Btw, I’m using java, rest assured, junit

The software testing community frequently discusses the merits of Puppeteer vs Selenium. When it comes to web browser automation, two popular tools often come up: Puppeteer and Selenium. Both are designed to help developers and testers automate their tasks, making their work faster and more efficient. But which one is the best for your needs?…
The post Puppeteer vs Selenium – Which Is Better in 2024? appeared first on Software Testing Material.

Google Gemini PHP for Laravel is a supercharged PHP API client that allows you to interact with the Google Gemini…

I was given some already done test plan. I added (simple) groovy script that changes number of threads (users) for thread groups by using standard setNumThreads method. https://jmeter.apache.org/api/org/apache/jmeter/engine/StandardJMeterEngine.html

I noted that if in test plan number of threads (users) for thread group is set to be constant number, the script works fine, but if number is set as ${somevar} (in GUI for for thread group), the script seams to have no effect (JMeter version 5 tested).

As variables are not shared between thread groups, what is simplest to implement way of changing number of threads (users) at runtime in such case?

I am new in mobile app automation
I have successfully launched Google Playstore application in my android device. but,i can not click on next tab “GAMES”.
My Code
package com.automate.app.screens;

import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;

public class FirstTest {

AppiumDriver<MobileElement> driver = null;

@Test
public void FirstCheck() throws MalformedURLException, InterruptedException
{

//Set the Desired Capabilities
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(“deviceName”, “My Phone”);
caps.setCapability(“udid”, “ZY223NZKZQ”); //Give Device ID of your mobile phone
caps.setCapability(“platformName”, “Android”);
caps.setCapability(“platformVersion”, “7.0”);
caps.setCapability(“appPackage”, “com.android.vending”);
caps.setCapability(“appActivity”, “com.google.android.finsky.activities.MainActivity”);
caps.setCapability(“noReset”, “true”);
try {
driver = new AndroidDriver<MobileElement>(new URL(“http://0.0.0.0:4723/wd/hub”), caps);
} catch (MalformedURLException e) {
System.out.println(e.getMessage());
}
Thread.sleep(2000);
driver.findElement(By.id(“com.android.vending:id/title”)).click();
Thread.sleep(5000);
driver.quit();
}

}

Error
[RemoteTestNG] detected TestNG version 6.14.2
Feb 12, 2019 4:26:10 PM io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0
INFO: Detected dialect: W3C
FAILED: FirstCheck
java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
at io.appium.java_client.HasSessionDetails.lambda$0(HasSessionDetails.java:49)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at com.google.common.collect.CollectSpliterators$1.lambda$forEachRemaining$1(CollectSpliterators.java:117)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at com.google.common.collect.CollectSpliterators$1.forEachRemaining(CollectSpliterators.java:117)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at io.appium.java_client.HasSessionDetails.getSessionDetails(HasSessionDetails.java:52)
at io.appium.java_client.HasSessionDetails.getSessionDetail(HasSessionDetails.java:56)
at io.appium.java_client.HasSessionDetails.getPlatformName(HasSessionDetails.java:65)
at io.appium.java_client.internal.JsonToMobileElementConverter.<init>(JsonToMobileElementConverter.java:49)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:89)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:94)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:95)
at com.automate.app.screens.FirstTest.FirstCheck(FirstTest.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:580)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:648)
at org.testng.TestRunner.run(TestRunner.java:505)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
at org.testng.SuiteRunner.run(SuiteRunner.java:364)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
at org.testng.TestNG.runSuites(TestNG.java:1049)
at org.testng.TestNG.run(TestNG.java:1017)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 44 more

===============================================
Default test
Tests run: 1, Failures: 1, Skips: 0
===============================================

I have added
Appium jar
java-client-7.0.0.jar
Selenium dependency

org.seleniumhq.selenium
selenium-java
3.14.0

appium version-1.10.0
I have googled about error but not found proper solution.
Any help is greatly appreciated.

Through this post on Playwright vs Selenium, we will make it easier to understand the key differences between Playwright and Selenium and figure out which tool might be better for your needs. When it comes to automation testing tools, both Playwright and Selenium are two powerful web automation tools used by software testers. Both help…
The post Playwright vs Selenium – Which Is Better in 2024? appeared first on Software Testing Material.

Data engineering in retail is vital for maintaining competitiveness and meeting escalating consumer demands. It involves strategic data management from collection to analysis, enabling retailers to improve decision-making and operational efficiencies. The blog discusses its key benefits, including enhanced customer experiences through personalized strategies and optimized supply chain operations. With advanced analytics, ML, and AI integration, data engineering helps retailers reduce costs and boost profitability.
The post How does Data Engineering in Retail Maximize Efficiency? first appeared on TestingXperts.