How do I resolve the Multiple keywords error

127 views
Skip to first unread message

Ranadheer K

unread,
Oct 25, 2021, 6:09:40 AM10/25/21
to robotframework-users
I have got a couple of classes in Python that uses the same Library

Login.py
from Zoomba.GUILibrary import GUILibrary

class LoginPage(GUILibrary):
     # Some locators here
       @keyword
       def login_with_username_and_pin(self, email_address, pin): 
               self.on_login_screen_enter_email_address(email_address=email_address)
               self.enter_login_pin(login_pin=pin)

Settings.py
from Zoomba.GUILibrary import GUILibrary

class SettingsPage(GUILibrary):
       # Some locators here
       @keyword
       def get_settings_title(self):
               self.wait_for_and_focus_on_element(self.settings_title, wait_time)
               return self.get_element_attribute(self.settings_title, "innerText")

Now I have a robot file with test cases that actually import these two classes as a Libray.

The issue I see is
  1. Multiple Keywords error: Keyword 'Save Selenium Screenshot' could not be run on failure: Multiple keywords with the name 'Save Selenium Screenshot' were found. 
  2. I read the documentation here extending Libraries . But I somehow could not understand how to resolve this in my case.
Could someone help me how to resolve this issue?

Reply all
Reply to author
Forward
0 new messages