Reinforcement Learning (RL) finetuning is an important step in training language models (LMs) to behave in specific ways and follow…
Development
The rapid advancements in Generative AI have underscored the importance of text embeddings. These embeddings transform textual data into dense…
Developing AI agents that can autonomously perform a wide variety of tasks with the same flexibility and capability as human…
The number of academic papers released daily is increasing, making it difficult for researchers to track all the latest innovations.…
In the rapidly evolving field of natural language processing (NLP), integrating external knowledge bases through Retrieval-Augmented Generation (RAG) systems represents…
Large Language Models (LLMs) are a subset of artificial intelligence focusing on understanding and generating human language. These models leverage…
Designing computational workflows for AI applications, such as chatbots and coding assistants, is complex due to the need to manage…
OpenAI has recently announced the development of SearchGPT, a groundbreaking prototype that revolutionizes how users search for information online. This…
I want to automate this page and click Ok Button, but the page is not displaying in HTML in Firebug and status is coming as “Waiting for …”
In such cases how to automate the click without elements ? Please advice..
I want to compare my data in CSV with the web content. The data in CSV file comprises of multiple rows and column. How can I verify that the data inputted on the web is correct comparing it with the CSV using Jmeter?
There is a search bar on the website I write any character I get the location of particular dealers along with the details and I have data in CSV and now I want to compare the data entered on the web is correct or not
EDIT: the data on the web is called through AJAX.
For single web element in that row i got index..for multiple column in a single row how to get the index:
IWebElement colelement = driver.FindElement(By.XPath(“//div[@id=’grdBooking’]//table//tr/
th[contains(text(),’Case#’)]”));
String colidx = colelement.GetAttribute(“idx”);
Console.WriteLine(“Colelement index is =” + colidx);
I have a Website were I want to click a button, but I can’t find in the button in the HTML script, what I have to write in my Python script?
Later I want to have something like
driver.find_element_by_css_selector()
Now I don’t know what I have to put in there
<div class=”custom-col” onclick=”Ajax(‘routes.php’,’main’);mainMenuLoad(‘mainMenuRoutes’);” style=”width: 20%;”>
<img src=”assets/img/icons/route-icon-shade.png” class=”btn-action” id=”mainMenuRoutes” style=”height:40px;”>
</div>
I hope you understood my question because I am not a native speaker
When I hover over login text there are list of links, i need to select Infostore using Page Object model approach. I am new to Selenium could any one help. I have the outer HTML for you:
<div class=”desktop-login”>
LOGIN
<ul class=”no-bullet list-nav-child sub-menu-lv”>
<li class=”nav-child-item”>
<a href=”https://infostore.saiglobal.com/”>Infostore</a>
</li>
</ul>
</div>
How to fetch text for
<h1 _ngcontent-gtj-c13=””> Site-2
<span _ngcontent-gtj-c13=”” class=”seprator”>|</span>
Building-1 <!—-> </h1>
I have used attribute innerhtml,value,outerhtml,javascript
Not able to fetch site name with building name
getting text= Site-2 |
expected = Site-2 | Building-1
Folksm I’m using TestNG 7.5 and Selenium 4.2.2, with IntelliJ and Java 11.
I’ve got all my bits imported and my tests will run individually, but I’m trying to get my setup and cleanup methods to work with the before and after annotations. Here’s a code sample:
public static class RunTest {
WebDriver driver;
WaitUtils waitUtils;
Actions actions;
StateUtils stateUtils;
public RunTest(WebDriver givenDriver){
this.driver = givenDriver;
this.actions = new Actions(givenDriver);
this.waitUtils = new WaitUtils(givenDriver);
this.stateUtils = new StateUtils(givenDriver);
}
@BeforeMethod(alwaysRun = true)
public void login(){
System.out.println(“test_++++++++++++”);
boolean firstLoginPageFound = true;
driver.navigate().to(“http://www.amazon.ca”);
InteractionUtils interactionUtils = new InteractionUtils(driver);
try{
interactionUtils.clickOnElementByXpath(“//div[@class=’nav-bb-right’]/a[text()=’Your Account’]”);
} catch (NoSuchElementException e){
firstLoginPageFound = false;
}
interactionUtils.clickOnElementByXpath(“//span[@id=’nav-link-accountList-nav-line-1′]”);
byte[] decodedBytes = Base64.getDecoder().decode(“”);
waitUtils.waitForVisibilityOfLocator(“//input[@id=’ap_email’]”).sendKeys(new String(decodedBytes));
interactionUtils.clickOnElementByXpath(“//input[@id=’continue’]”);
decodedBytes = Base64.getDecoder().decode(“”);
waitUtils.waitForVisibilityOfLocator(“//input[@id=’ap_password’]”).sendKeys(new String(decodedBytes));
interactionUtils.clickOnElementByXpath(“//input[@id=’signInSubmit’]”);
}
@Test
public void checkLandingPage(){
System.out.println(“REST++++++++++++”);
Assert.assertTrue(stateUtils.verifyElementIsVisible(“//div[@id=’nav-xshop’]//a[contains(@class, ‘nav-a’) and text()=’Buy Again’]”), “Buy again button is missing”);
}
@AfterMethod(alwaysRun = true)
public void cleanUp(){
System.out.println(“BEST++++++++++++”);
driver.close();
}
}
If I run something like:
RunTest test = new RunTest(new SetUpUtils().getDriver());
test.checkLandingPage();
the checkLandingPage method will run, and fail, but the login and cleanup methods won’t run. I’ve tried a few variations on the annotations, but no luck so far.
The imports used are :
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.interactions.Interaction;
import org.openqa.selenium.support.ui.*;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.time.Duration;
import java.util.Base64;
Maintaining the correct tire pressure on your vehicle not only helps you save on gas, but also makes driving safer.…
The AstroAI Dual Motor’s tire inflator can continuously operate for up to 15 minutes, inflating a flat tire from 0…
Start Your Own ChatGPT Office with AI Agents: Revolutionize Your Business with Intelligent Virtual Assistants by Srinidhi Ranganathan – Books…
Start Your Own ChatGPT Office with AI Agents: Revolutionize Your Business with Intelligent Virtual Assistants by Srinidhi Ranganathan – Books…
Modern applications have high demands for data storage capabilities. Over the past 10 years, the rise of purpose-built data platforms…