While experimenting with a test case on a website, Selenium was able to accurately register the events. Now, I am faced with a challenge - how can I search for a specific class and retrieve the innerHTML of that class, especially when using Java as my driving language?
To provide more clarity, let's say I have a class structure like this:
<h1 class="classname">.....</h1>
My goal is to extract all the text enclosed within those tags.
In addition, if the buttons' IDs on the page are dynamically created, how can I validate the clicking action on them? These buttons likely use ajax. Upon clicking, Selenium generates this XPath:
//div[@id='c4aef94de622f51859827294']/div/div/div[1]/span[2]/span/span[3]/a
While the actual HTML of the button appears like this:
<a href="#" bindpoint="forward" class="ButtonForward"/>
The question arises - is it feasible to interact with and click on such a button?