Artificial intelligence algorithms demand powerful processors like GPUs, but acquiring them can be a major hurdle. The high initial investment…
Development
Using reinforcement learning (RL) to train large language models (LLMs) to serve as AI assistants is common practice. To incentivize…
Data curation is essential for developing high-quality training datasets for language models. This process includes techniques such as deduplication, filtering,…
I have a strange behavior : I created Test Class with 2 Test Methods as below.
When I call AddLimitedBuyOrderwithRandom in the first method it works fine without any exception, but if I call AddLimitedBuyOrderwithRandom from the second method I get a NoSuchElement exception.
This is the code for the test class:
public class TestLoginPage extends TestBase {
public HomePage homeobject;
public NewOrdersLoginPage OrderLoginObject;
public OrderMgmtPage OrdersMgmentObject;
@Test
public void SuccessLogin() throws InterruptedException
{
homeobject = new HomePage(driver);
homeobject.OpenOrdersPage();
OrderLoginObject = new NewOrdersLoginPage(driver);
OrderLoginObject.userLogin(“140”, “12345”);
OrdersMgmentObject = new OrderMgmtPage(driver);
OrdersMgmentObject.AddLimitedBuyOrderwithRandom(“10”);
}
@Test(enabled= true)
public void AddLimitOrderTest() throws InterruptedException
{
OrdersMgmentObject = new OrderMgmtPage(driver);
OrdersMgmentObject.AddLimitedBuyOrderwithRandom(“10”);
}
}
and this is the code for AddLimitedBuyOrderwithRandom:
public void AddLimitedBuyOrderwithRandom(String SharesCount) throws InterruptedException
{
clickButton(NewOrderLink);
clickButton(BuyTypeRadio);
selectDropdownByValue( companyList, “Company”);
typeText(ShareNoTxt, SharesCount);
selectDropdownByValue( OrderTypeList, “2”);
selectDropdownByValue( OrderValidityList, “0”);
double Pricerandom = getRandomNumberInRange(ReturnShareLimitDown(),ReturnShareLimitUp());
typeText(SharePriceTxt,Double.toString(Pricerandom));
clickButton(SubmitOrderBtn);
}
(Added from comments on answers)
My base class is:
public class TestBase
{
public static WebDriver driver ;
public static String downloadPath = System.getProperty(“user.dir”) + “\Downloads”;
public String BaseURL = “URL”;
@BeforeSuite
@Parameters({“browser”})
public void startDriver(@Optional (“chrome”) String browserType)
{
if (browserType.equalsIgnoreCase(“chrome”) )
{
System.setProperty(“webdriver.chrome.driver”, System.getProperty(“user.dir”)+”/drivers/chromedriver.exe”);
driver = new ChromeDriver();
}
}
driver.manage().window().maximize();
driver.navigate().to(BaseURL);
}
The developers of the open-source office suite ONLYOFFICE Docs released version 8.1. The post ONLYOFFICE Docs 8.1 released: Meet a…
We recommend the best free and open source Clojure web frameworks. The post 8 Top Free and Open Source Clojure…
xpybar is a minimalistic dock panel. Its source code is designed so that all parts of it can be replaced…
Today’s a day for a smorgasbord. We’re going to start with a classic kind of bad code, from astephens: pbUpdates.Value…
SliTaz is a free operating system working completely in memory from removable media The post SliTaz – Live CD operating…
Learn five key ways a well-structured, professional corporate identity can help to cultivate trust in an audience. Continue reading How…
Android 15 is on the horizon and the final release is starting to shape up. The third beta is all…
Not happy with your Samsung Fold or Google Pixel? OnePlus will let you trade them in for up to $800…
The LG S95TR wireless soundbar system is one of the best I’ve heard and comes packed with special features that…
Trained on data from stock exchanges in three markets, the Singapore bank’s AI platform predicts price movements and generates stock…
The hardened derivation of iOS and MacOS, running Apple’s Private Cloud Compute servers, will be made available to allow security…
I’ve tested a lot of AI tools. These are the four I use almost daily to enhance my productivity. Source:…
The CEO embraced AI but employees were uneasy. What now? Rakuten’s three-stage program could be your path to success, too.…
The Petlibro Polar Wet Food Automatic Feeder helps keep your pet’s eating schedule on time, even when you’re away. Plus,…
I’ve tested several smart rings already, and these useful features would make Samsung’s upcoming wearable the best of the best.…
Not happy with your Linux distro’s default file manager? Fret not, there are plenty of options to choose from. Considering…