Gets buttons from the `Followers` or `Following` dialog boxes
(dialog, channel)
| 1467 | |
| 1468 | |
| 1469 | def get_buttons_from_dialog(dialog, channel): |
| 1470 | """Gets buttons from the `Followers` or `Following` dialog boxes""" |
| 1471 | |
| 1472 | buttons = None |
| 1473 | |
| 1474 | if channel == "Follow": |
| 1475 | # get follow buttons. This approach will find the follow buttons and |
| 1476 | # ignore the Unfollow/Requested buttons. |
| 1477 | buttons = dialog.find_elements( |
| 1478 | By.XPATH, read_xpath(get_buttons_from_dialog.__name__, "follow_button") |
| 1479 | ) |
| 1480 | |
| 1481 | elif channel == "Unfollow": |
| 1482 | buttons = dialog.find_elements( |
| 1483 | By.XPATH, read_xpath(get_buttons_from_dialog.__name__, "unfollow_button") |
| 1484 | ) |
| 1485 | |
| 1486 | return buttons |
| 1487 | |
| 1488 | |
| 1489 | def get_user_id(browser, track, username, logger): |
nothing calls this directly
no test coverage detected