New to Python/Selenium testing.
Currently our site breaks the page into panels. Each panel can vary in what it contains (i.e. Charts, links, text).
All panels are setup with a "h3 class="panel-title">text I want"
I'm looking to scan the page, determine how many panels, then loop through to each panel to grab the "panel_title" text and use that in a logging setup.
I'm able to grab the first panel into its own using the xpath
//div[contains(concat(' ', @class, ' '), ' tab ') and not(contains(concat(' ', >@style, ' '),'none'))]//div[contains(concat(' ', @class, ' '),' panel-wrapper >')][1] where the [1] at the end determines which panel I'm working with.
I'm am then going to run different tests over that panel. But that's as far as I can get, I'm not sure how to search inside that particular element to retrieve the "panel_title".
Hoping this is enough to go on.
Thanks
Aucun commentaire:
Enregistrer un commentaire