Libraries & Frameworks

Retail analytics in eCommerce leverages AI and ML to transform business operations, enhancing decision-making and competitive edge. The blog discusses how it enables retailers to analyze consumer behavior, optimize inventory, and craft targeted marketing strategies. With capabilities to predict trends and manage inventory efficiently, retail analytics proves crucial in meeting consumer demands and driving business success. Essential for modern eCommerce platforms, it uses detailed data from multiple sources to offer insights that help personalize customer interactions and improve overall business performance.
The post Importance of Retail Analytics in the eCommerce Industry first appeared on TestingXperts.

How to click on a link that is under a table element, but that is not visible on first page. There are pagination links “previous” & “next” on the page, and i want to iterate over multiple pages and find my link “a” tag based on Link text.
if link matches the string, then only click on the link, otherwise keep clicking “Next” in the pagination.
List<WebElement> links = driver.findElements(By.tagName(“a”));
int size = links.size();

for (int i = 0; i < size; i++) {
if (links.get(i).getText().equalsIgnoreCase(LinkMatchValue)) {
driver.findElement(By.xpath(“//a[contains(text(),'” + LinkMatchValue+ “‘)]”)).click();

} else {
driver.findElement(By.linkText(“next”)).click();

}

}

==================================================================================
<table id=”table1″>
<thead>
<tr>
</td>
</tr><tr class=”classA”>
<td><a href=…”>Link 1</a></td>
</tr>
<td><a href=…”>Link 1</a></td></tr><tr class=”even”>
<td><a href=…”>Link 2</a></td></tr><tr class=”even”>
<td><a href=…”>Link 3</a></td></tr><tr class=”even”>
<td><a href=…”>Link 4</a></td></tr><tr class=”even”>
<td><a href=…”>Link 5</a></td></tr><tr class=”even”>
<td><a href=…”>Link 6</a></td></tr><tr class=”even”>
</tbody>
</table>

One time passcode Vue 3 Input Component. Continue reading on Vue.js Feed » Source: Read More

In my application, there is a drop down to select “Estimation Date”:

Please find below my test case. It is failing at the line where I am trying to select “Since”:

public class dropdown_issue {

GenericFunctions gf= new GenericFunctions();

@Test(enabled = true)

public void dropdown () throws InterruptedException{
System.setProperty(“webdriver.gecko.driver”,”D:\Selenium\BrowserDrivers\geckodriver.exe”);
WebDriver dr=new FirefoxDriver();
dr.get(“http://10.127.129.79:8080/abc”);

Thread.sleep(3000);
dr.findElement(By.id(“username”)).sendKeys(“user”);
dr.findElement(By.id(“password”)).sendKeys(“user”);
dr.findElement(By.xpath(“//button[@type=’submit’]”)).click();
WebElement est_date_dd= dr.findElement(By.xpath(“//div[@class=’clearfix’]//select[@name=’est-date’]”));
Select est_date= new Select(est_date_dd);
est_date.selectByValue(“Since”);
Thread.sleep(3000);
dr.quit();
}
}

Code isn’t able to read Properties file. It returns validation error message in response;

The method click() is undefined for the type Object

Properties obj = new Properties();
FileInputStream objfile = new FileInputStream(System.getProperty(“user.dir”)+”\application.properties”);
obj.load(objfile);

// Navigate to link Mobile Testing and Back

driver.findElement(By.xpath(obj.getProperty(“MobileTesting”))).click();
driver.navigate().back();

// Enter Data into Form

driver.findElement(By.id(obj.getProperty(“EmailTextBox”))).sendKeys(“test@gmail.com”);
driver.findElement(By.id(obj.getProperty(“SignUpButton”))).click();

I need to validate few status of the android device. Can any one let me know how to extract the information from adb dumpsys and validate the responses using Java. Your help is much appreciated.

Ex: ‘adb shell dumpsys battery’ this code when android device is connected to windows gets executed and will fetch the response. can someone help me how to extract the information from response and validate the same.

How do I detect text inside of this, this is HTML & this is XPath. I tried

HTML
<span class=”messageText”>Hello.</span>
XPath
//*[@id=”liveAgentChatLogText”]/span[22]/span[2]

I tried with this but it didn’t work, it said no such element found.

driver.find_element(By.XPATH, ‘//*[@id=”liveAgentChatLogText”]//*[contains(string(.), “Hello”)]’)

I have two loop controllers inside a simple controller.
But it stops running after the execution of first loop even if the results is successful.

Structure is given below

ThreadGroup

Simple Controller 1

HTTP Request
Loop Controller1 (Loops 10 times with a CSV file)
Loop Controller2 (Loops 25 times with another CSV file)

Simple Controller 2

HTTP Request 1
HTTP Request 2
HTTP Request 3
Loop Controller 3 (Loops 15 times 3rd CSV file)

But execution stops after completing Loop controller 2. It doesn’t go for the Loop controller 2 or doesn’t start Simple Controller 2. If Simple Controller 1 is disabled, it will run Simple Controller 2 successfully.

Any suggestion will be of great help.
Thanks

I’m working on a project with www.NJMLS.com. I’m trying to extract email of agent name “Edward An”:
import dryscrape as d
d.start_xvfb()
br = d.Session()
br.visit(‘http://www.njmls.com/members/index.cfm?action=dsp.results&city=&county=&nametype=firstname&name=Edward&x=70&y=33’)
#open url and try to extract the email of Edward An

How to get email of “Edward An”? If I try:
for x in br.xpath(“//*[@class = ‘realtor-info’]/*”)
# selecting all elements in <div class=”realtor-info”>….</div>
if “Edward An” in x:
print x[‘herf’]
#Not responding

I am not getting any response.
What’s wrong with my script?
if “Edward An” in x.text()
print x

This is also not working. Still there is no error and no response.

<svg aria-label=”Unlike” class=”_8-yf5 ” color=”#ed4956″ fill=”#ed4956″ height=”24″ role=”img” viewBox=”0 0 48 48″ width=”24″><path d=”M34.6 3.1c-4.5 0-7.9 1.8-10.6 5.6-2.7-3.7-6.1-5.5-10.6-5.5C6 3.1 0 9.6 0 17.6c0 7.3 5.4 12 10.6 16.5.6.5 1.3 1.1 1.9 1.7l2.3 2c4.4 3.9 6.6 5.9 7.6 6.5.5.3 1.1.5 1.6.5s1.1-.2 1.6-.5c1-.6 2.8-2.2 7.8-6.8l2-1.8c.7-.6 1.3-1.2 2-1.7C42.7 29.6 48 25 48 17.6c0-8-6-14.5-13.4-14.5z”></path></svg>

I’m needing to grab area-label=”Unlike” but can’t figure out how. I’ve tried the following:
browser.find_element_by_xpath(“//svg[@class=’_8-yf5 ”][@aria-label=’Unlike’]”)

I’m using Python 3.11.5, and I want to extract text from a Webelement with selenium.
I use Chromedriver as a driver, and I want to find an element By.CLASS_NAME
Here is my code

What happens ?

When I print (element), it gives me a Webdriver element, which I can’t read.

When I print (element.text), it gives me an error :

Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x000001DDFE4F0690>: Failed to establish a new connection: [WinError 10061] Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée’)’: /session/0109eeaf781d2f899ee82e0fd10eac19/execute/sync
What have I tried ?

After using driver.get(url), I already tried to apply time.sleep(10)

I checked my versions of Chrome + Chromedriver

I disabled my proxy

Do you have any idea about what the problem is ?

I have just completed my first two playwright tests, but I am not sure how to optimize them.
The scenario is the following:

I log in to the system with an administrative user.
I create a new user and save the generated username and password using the following code:

// copy username and password
const username = await page.locator(‘#username0’).innerText();
const password = await page.locator(‘#passwd0’).innerText();
expect(username).not.toBeNull();
expect(username).not.toBeUndefined();
expect(password).not.toBeNull();
expect(password).not.toBeUndefined();

I log out the admin user.
I log in the created user (using the const created above), accept the terms and conditions and answer 220 questions, saving a screenshot of every 20th question.

for (let x = 1; x <= 220; x++) {
if (x % 20 === 0) {
await storeScreenshot(popupPage, testInfo, ‘test Q’ + x);
}
await popupPage.waitForLoadState();
await popupPage.locator(user.selector).click();
if (x % 20 === 0) {
await storeScreenshot(popupPage, testInfo, ‘test Q’ + x + ‘ – selected’);
}
await popupPage.locator(‘#submitknap’).click();
}

I am very happy that this works, and it is even parameterized with a csv for testing different answer patterns.
If any step in this fails, the whole case fails.
Ideally the admin part is not necessary as a part of the test and is reusable, but creating a user IS something I want to have. I could create some static users and wipe them before running each test, but I like the dynamic approach of creating a user prior to logging it in. I also have some environments that are not easily reset.
I am in doubt as to how I can split this test scenario up. Should I have the admin part as a helper function called by the testcase, or as a smaller testcase prior to calling the main testcase?
Edit
For a little perspective this test takes 3 minutes to complete. a complete run of 6 parameters in three browsers takes 16 minutes.

Hyperautomation in P&C insurance is transforming the industry by integrating AI, ML, and RPA to streamline operations and enhance customer service. The blog discusses how by automating processes and decision-making, insurers can significantly reduce errors, improve processing times, and meet evolving customer expectations. This approach not only boosts operational efficiency but also ensures compliance with regulatory standards, making it essential for insurers to stay competitive in today’s challenging market.
The post Why is Hyperautomation for the P&C Insurance Industry Important? first appeared on TestingXperts.

AI has taken over many global industries, including software testing. Today, software testers can leverage this innovative technology to boost their workflow and efficiency. If you are interested in software testing or are looking for a career in this field, then you might be interested in the contemporary uses of AI, especially in connection to…
The post Understanding the Integration of AI in Software Testing appeared first on Software Testing Material.