Libraries & Frameworks

Here is my script –
next=WDS.browser.findElement(pkg.By.xpath(“//button[contains(@class,’btn btn-sm btn-light border ml-3′)]”))

while(next.isEnabled()==true)
{
//java.lang.Thread.sleep(4000);

var wait19 =new org.openqa.selenium.support.ui.WebDriverWait(WDS.browser, 9000)
wait19.until(org.openqa.selenium.support.ui.ExpectedConditions.elementToBeClickable(pkg.By.xpath(“//button[contains(@class,’btn btn-sm btn-light border ml-3′)]”))).click()

next=WDS.browser.findElement(pkg.By.xpath(“//button[contains(@class,’btn btn-sm btn-light border ml-3′)]”))
//WDS.log.info(WDS.browser.getPageSource())
if (!next.isEnabled()) {
WDS.log.info(‘Next button disabled’)
break
}
}

In my application, I need to visit total 300 pages and calculate time taken to traverse from first page to last.
But, when click on next button, it throws exception:
ERROR c.g.j.p.w.s.WebDriverSampler: element click intercepted: Element <button _ngcontent-pde-c133=”” class=”btn btn-sm btn-light border ml-3″>…</button> is not clickable at point (226, 567). Other element would receive the click: <div _ngcontent-pde-c109=”” class=”overlay ng-tns-c109-11 ng-trigger ng-trigger-fadeIn ng-star-inserted ng-animating” style=”background-color: rgba(0, 0, 0, 0.8); z-index: 99999; position: fixed;”>…</div>
How do I resolve it?

I’m trying to compare two strings using this code in a switch statement:
case “medStepOne”:
WebEligibilityMedFirst.SelectOptions(p0);
if (!p0.Equals(“failOne”) || !p0.Equals(“failTwo”) || !p0.Equals(“failThree”) || !p0.Equals(“failFour”))
{
WebEligibilityMedSecond.SelectOptions(p0);
}
break;

The string is definitely “failOne” so I believe that the code should bypass the if statement but it does not.

I have copied some text from the website and then pasted it into the text file. And also I did the same thing to paste the second text using the “Append To File” keyword.
I want to paste the first text in the first row and the second text in the next row. How could I do that?
This is what I have so far,
*** Test Cases ***
TC_01
Open Browser ${BASE_URL} gc
EXECUTE JAVASCRIPT window.scrollTo(200,400)
sleep 5s

${Text} = Get Text xpath=//div[2]/md-card/header/h2
${Value} = Get Text css=.recommended-size
createFile C:/MyProjects/Records/File.txt ${Text}
Append To File C:/MyProjects/Records/File.txt ${Space}
Append To File C:/MyProjects/Records/File.txt ${Value}

log to console success
sleep 2s

I got the result as the above screenshot, and what I want to do is, I want to paste the “1km” on the next line.
Please help to solve this issue. Any guidance and advice will be greatly appreciated!

This blog discusses the significant role of AI-driven intelligent systems in transforming data management. It emphasizes how ML and NLP are pivotal in enhancing data accuracy and enabling real-time decision-making. By automating processes and improving predictive analytics, AI facilitates efficient and informed decisions across different sectors. Examples from healthcare and e-commerce illustrate AI’s effectiveness in areas like fraud detection and enhancing customer experiences. Adopting intelligent systems can help businesses optimize operations and maintain a competitive edge in a tech-driven world.
The post Transforming Data Management: The Impact of AI-Driven Intelligent Systems first appeared on TestingXperts.

This is a lightly-edited excerpt from a longer blog post that you’ll find here. I recommend you read it too, but if you’re short on time, here’s the core of it. If you care about understanding the status of your product, you’ll probably care about testing it. You’ll want testing to find out if the product you’ve got is the product you want. If you care about that, you need … Read more

I am trying to translate cucumber into XRay for Jira issues with the right structure. The result should be issues with Test Executions I can run for every example.

I want to make a test with multiple ‘Examples’ a-la Scenario Outlines in Cucumber.

Am I wanting to do Test Sets? A Test Plan?

Something else? I need an XRay for Cucumber testers intro.

Example fake Scenario Outline.

Scenario Outline: Ensure privs restricted
Given I am logged onto “<container>”
And I run the priv check
Then privs are restricted
Examples:
| container |
| rabbit1 |
| zalenium1 |
| zalenium2 |

Thanks.

I am working on Jmeter for testing a Magento application while using the CSS selector extractor and providing the following information. Please let me know if the parameters are correct. In the post request, I have replaced the form_key as ${form_key}. Please help.Reference link for the steps followed

On executing set of behave tests on linux server manually the behave tests are getting stuck at some random behave test and rest other behaves are not executed. There is no particular bdd which is giving issue. It causes the server to hang. How should i troubleshoot it.

I am trying to run 2 different tests on 2 different emulators parallelly. But my execution halts on 1 device as soon as the test on other device is complete.
I am using the below driver setup code
capabilities = new DesiredCapabilities();
capabilities.setCapability(“platformName”, “Android”);
capabilities.setCapability(“VERSION”, platformVersion);
capabilities.setCapability(“udid”, deviceName);
capabilities.setCapability(“app”, “app.apk”);
capabilities.setCapability(“appPackage”, “xxx”);
capabilities.setCapability(“appActivitiy”, “xxx.HomeActivity”);
capabilities.setCapability(“systemPort”, systemPort);
driver = new AndroidDriver(new URL(“http://0.0.0.0:4723/wd/hub”), capabilities);

And below is my testNG.xml file
<?xml version=”1.0″ encoding=”UTF-8″?>
<suite name=”Parallel Tests” parallel=”tests” thread-count=”2″>
<test name=”Android native app test on Android 12″>
<parameter name=”platformVersion” value=”12″/>
<parameter name=”deviceName” value=”emulator-5554″/>
<parameter name=”systemPort” value=”6666″/>
<classes>
<class name=”LoginTest” />
</classes>
</test>
<test name=”Android native app test on Android 10″>
<parameter name=”platformVersion” value=”10″/>
<parameter name=”deviceName” value=”emulator-5556″/>
<parameter name=”systemPort” value=”8666″/>
<classes>
<class name=”SignUpTest” />
</classes>
</test>
</suite>

I get the following exception
org.openqa.selenium.NoSuchSessionException: Session ID is null. Using WebDriver after calling quit()?

And sometimes this exception as well
org.openqa.selenium.NoSuchSessionException: A session is either terminated or not started

An Overview of Continuous Threat Exposure Management How does it work? What Problem is CTEM Solving for Businesses? 5 Stages of Continuous Threat Exposure Management Program Businesses with CTEM vs. Without CTEM Why Partner with Tx to Manage Cybersecurity? Summary “A breach has occurred, and the company’s data has been compromised,” mentioned in the large … Continue reading “Continuous Threat Exposure Management (CTEM): Key Insights for CISOs”
The post Continuous Threat Exposure Management (CTEM): Key Insights for CISOs first appeared on TestingXperts.

I just started using Jmeter and don’t know how to make a variable. This is the HTTP body request and I would like to change the project name each time I perform load testing.

I tried using CSV config but it didn’t work.

To run my Selenium/Cucumber java project, I need to pass some VM arguments, variables, properties path etc… now easiest way is to pass it in Eclipse run configuration under “VM arguments” tab. I need to give path of Log4j2.xml, sqlJdbc driver, any UserID etc.
Now, if i put all this in a properties file and then run the “TestRunner’, then how can i make sure properties are loaded before the Features run. I get NullPointerException.
Can i put this in a static block? THis way will it get initialized before any TestNG feature runs?

@CucumberOptions(glue = { “stepDefinitions” }, features = {
“src/test/resources/features/CreateUserProfile.feature” }, plugin = { “pretty”,
“json:test-output/JsonReport.json”, “html:test-output/HTMLReport.html”,
“com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:”, })

public class TestRunner {
public TestNGCucumberRunner testNGCucumberRunner;

@BeforeClass(alwaysRun = true)
public void setUpClass() {
if (testNGCucumberRunner == null) {
testNGCucumberRunner = new TestNGCucumberRunner(this.getClass());
}
}

@Test(groups = “cucumber scenarios”, description = “Runs Cucumber Scenarios”, dataProvider = “scenarios”)
public void scenario(PickleWrapper pickleEvent, FeatureWrapper cucumberFeature) throws Throwable {
testNGCucumberRunner.runScenario(pickleEvent.getPickle());
}

@DataProvider
public Object[][] scenarios() {
if (testNGCucumberRunner == null) {
testNGCucumberRunner = new TestNGCucumberRunner(this.getClass());
}
return testNGCucumberRunner.provideScenarios();
}

@AfterClass(alwaysRun = true)
public void tearDownClass() {
testNGCucumberRunner.finish();

}

static {
SimpleDateFormat dateFormat = new SimpleDateFormat(“yyyy-MM-dd”);
System.setProperty(“current.date”, dateFormat.format(new Date()));
String propertyFilePath = “C:\EclipseWorkspace\Automation\src\main\resources\config.properties”;
BufferedReader reader;
try {
reader = new BufferedReader(new FileReader(propertyFilePath));
Properties properties = new Properties();
try {
properties.load(reader);
reader.close();
} catch (IOException e) {
e.printStackTrace();
}
} catch (FileNotFoundException e) {
e.printStackTrace();
throw new RuntimeException(“Config.properties not found at ” + propertyFilePath);
}

}

}

UPDATE:
I get this error …i have loaded the properties file in the TestRunner.java file, also loaded in the BaseTest.java class where driver is initialized. Still i get this error. Please help. I don’t want to use eclipse VM arguments and want my properties to be loaded from the script only.
java.lang.NullPointerException: Cannot invoke “String.equalsIgnoreCase(String)” because the return value of “java.lang.System.getProperty(String)” is null

I’m running a test from JMeter sending HTTPS requests to a load balancer that is then distributing the user load across multiple application servers. We have an instance where as the load grows we are seeing Non HTTP response code: org.apache.http.conn.HttpHostConnectException errors reported in JMeter. In this instance we are not seeing the requests making it to any of the application servers.

In order to isolate where the problem lies (Load Balancer or Load Generator) I was attempting to utilize Wireshark to validate request transmission, but it’s unable to provide me with the information due to being HTTPS.

The issue is observed both in a single load generator configuration and JMeter Server configuration with 1 master and 2 load generators. All 3 are using JMeter 5.1.1 and are being hosted on a Windows Server VM.

Setting the locale is not enough most of the time, some countries use more than one languages. Also, different countries…

I’m running Appium Server 2, and some plugins show up as active, but some don’t.
I would like to enable the element-wait plugin, how do I do that?

I want to run my 5 Cucumber feature files with “Mvn test” Command parallely. Now, the “mvn test” or ‘mvn build” runs fine and maven builds the project, but feature file dont run. Can this be due to version mismatch? I am using JUnit 4, Cucumber 7.4.0 and Maven 6.9.3. Tried with lastest 7.18.0 Cucumber but nothing works. Also, I am using maven surefire plugin to run 5 feature files parallely, but nothing runs. NO feature file is running. Do in need to make multiple runners? I Just want parallel execution at feature levels, not scenario level. Please provide some assistance. I am stuck.
[INFO]
[INFO] — maven-surefire-plugin:3.3.0:test (default-test) @ SmokeTestAutomation —
[INFO] ————————————————————————
[INFO] BUILD SUCCESS
[INFO] ————————————————————————
[INFO] Total time: 22.154 s
[INFO] Finished at: 2024-06-23T17:36:09+05:30
[INFO] ————————————————————————

POM.xml:
<dependencies>
<!– https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core –>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.23.1</version>
</dependency>
<!– https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api –>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.23.1</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.3.1</version>
</dependency>
<!– https://mvnrepository.com/artifact/org.apache.poi/poi-examples –>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-examples</artifactId>
<version>5.1.0</version>
</dependency>
<!– https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml –>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.1.0</version>
</dependency>
<!– https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java –>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.13.0</version>
</dependency>
<!– https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-api –>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>4.13.0</version>
</dependency>
<!– https://mvnrepository.com/artifact/io.cucumber/cucumber-testng –>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.4.0</version>
</dependency>
<!– https://mvnrepository.com/artifact/io.cucumber/cucumber-core –>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-core</artifactId>
<version>7.4.0</version>
</dependency>
<!– https://mvnrepository.com/artifact/io.cucumber/cucumber-jvm –>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-jvm</artifactId>
<version>7.4.0</version>
<type>pom</type>
</dependency>
<!– https://mvnrepository.com/artifact/io.cucumber/cucumber-junit –>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>7.4.0</version>
</dependency>
<!– https://mvnrepository.com/artifact/io.cucumber/cucumber-testng –>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>7.4.0</version>
</dependency>
<!– https://mvnrepository.com/artifact/org.testng/testng –>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>openxml4j</artifactId>
<version>1.0-beta</version>
</dependency>
<!– https://mvnrepository.com/artifact/commons-collections/commons-collections –>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>4.1</version>
</dependency>
<!– <dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.4.0</version>
</dependency> –>
<!– https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api –>
<!– https://mvnrepository.com/artifact/junit/junit –>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
<!– https://mvnrepository.com/artifact/com.jcabi/jcabi-log –>
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>5.1.1</version>
</dependency>
<dependency>
<groupId>tech.grasshopper</groupId>
<artifactId>extentreports-cucumber7-adapter</artifactId>
<version>1.14.0</version>
</dependency>
</dependencies>
<build>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<includes>
<include>**/TestRunner.java</include>
</includes>
<parallel>methods</parallel>
<useUnlimitedThreads>true</useUnlimitedThreads>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<includes>
<include>**/TestRunner.java</include>
</includes>
<parallel>methods</parallel>
<useUnlimitedThreads>true</useUnlimitedThreads>
</configuration>
</plugin>
</plugins>
</build>
</project>

TestRUnner.Java
import org.junit.runner.RunWith;

import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;

@RunWith(Cucumber.class)
@CucumberOptions(glue = { “stepDefinitions” }, features = { “src/test/resources/features” },

monochrome = false, tags = “@UserLevel and @AdminLevel”)

public class TestRunner {

}