Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to generate random IBAN number (Seleinium C#) [closed]

I have fill the the random account number in textbox.My code below

        string AccountNumberStr = "******************";
        personEditPage.FillBankAccount(AccountNumberStr);

Problem is for each time when i'm running the test i have to change the account number manually.There is any possiblity to replace using IBAN generator ?!

like image 456
Mutu Arron Avatar asked Nov 27 '25 11:11

Mutu Arron


1 Answers

There is a pattern in generating the IBAN code for each country, such as:

enter image description here

So, you need to know how to generate BBAN first. So, all of these things makes your code more and more difficult.

But

I suggest you to use your slenium to get the value from this site. Since you already, lunch your selenium browser, it wouldn't be difficult for you to navigate to the url :

driver.navigate().to("https://www.generateiban.com/test-iban/"); 
string AccountNumberStr = driver.findElement(By.xpath("//*[@id="iban"]");

There is a drawback for it, because it makes your app slow, but it is short, and easy to understand

like image 129
Sal-laS Avatar answered Nov 30 '25 00:11

Sal-laS