How to capture dynamicaaly generated values? | Selenium Forum
M
Posted on 13/09/2015
Hi Ashish,

For the site "http://www.mortgagecalculator.org/"
I am entering different set up values and wanted to print the minimun of "Monthly Payment" value generated for all different value of set.

Is there any way we can use collections for this?

M
Replied on 14/09/2015

[quote="Sadhana":33avwyvj]Hi Ashish,

For the site "http://www.mortgagecalculator.org/"
I am entering different set up values and wanted to print the minimum of "Monthly Payment" value generated for all different value of set.

Is there any way we can use collections for this?[/quote:33avwyvj]

I couldn't understand your problem can please again explain the problem.


M
Replied on 14/09/2015

for this site "http://www.mortgagecalculator.org/" when I am enetering different values say different "Interest rate"
and click on "Calculate" I get different output values of "Monthly Payment".

So My question is , if I want to check for interest rates , 4, 5, 8 and print the minimum how can I do that?


M
Replied on 15/09/2015

[code:cwd1ikoc] driver.findElement(By.xpath("//*[@id="intrstsrate"]")).getAttribute("value");[/code:cwd1ikoc]

try this.
you can get any attribute this way.


M
Replied on 15/09/2015

I am getting 3 different Monthly values for 3 different Interest rates , But
I want to compare and Print the MIN/MAX of all values


M
Replied on 15/09/2015

[quote="Sadhana":25j51hnq]I am getting 3 different Monthly values for 3 different Interest rates , But
I want to compare and Print the MIN/MAX of all values[/quote:25j51hnq]

to campare them you can use if statement.

to print them use
[code:25j51hnq]int interest=driver.findElement(By.xpath("//*[@id="intrstsrate"]")).getAttribute("value");
System.out.println(interest);
[/code:25j51hnq]