Automate signing out of Spira using Selenium

Friday, July 24, 2015 6:28:32 PM
Hi all,

There are some values of interest that the Spira UI does not provide -- a good example is: in a test set, there's a list of test cases and pass/fail/not-run, but no counts for these, and no count of the number of test cases in the set. It's something you'd honestly expect to see, and it would be useful, but it's not there.

What we're doing is pointing python + selenium at the test set pages, scraping the information we need (find by xPath, etc.) and going from there. Sort of a wrapper to Spira's UI.

However, we are having trouble logging out from Spira (since only one session is allowed, having that session still logged in brings up that "your account is logged in in multiple locations" screen).

There's a log out link ('//a[.="Log Out"]') but by default it's not visible. You need to click on a dropdown which is apparently a div of class "PopupButton"; but doing that apparently is not enough.

What's a good way to programatically log of of Spira? Thanks for your attention, your product is really great
1 Replies
Friday, July 24, 2015 6:36:40 PM
Avatar
re: soglesby on Friday, July 24, 2015 6:28:32 PM
Found it:

driver.find_element_by_css_selector("#tstGlobalNavigation_mnuUserOptions > div.PopupButton").click()
driver.find_element_by_link_text("Log Out").click()
Statistics
  • Started: Friday, July 24, 2015 6:28:32 PM
  • Last Reply: Friday, July 24, 2015 6:36:40 PM
  • Replies: 1
  • Views: 495