I am facing an issue while trying to set some assertions by extracting a value and then comparing it. However, the statement to extract the value always returns nil.
Expected value:-
<span class="contractSalesPrice.contractSalesPrice">$314,507.30</span>
I have attempted the following methods: -
element1 = browser.find_element(:css,"#total > tbody > tr > td:nth-child(4) > span")
browser.execute_script("return arguments[0]", element1)
browser.find_element(:css,"#total > tbody > tr > td:nth-child(4) > span").attribute('value')
browser.find_element(:css,"#total > tbody > tr > td:nth-child(4) > span").value
What could possibly be causing this issue?
Any help would be greatly appreciated. Thank you in advance.
Abhishek