Forum Discussion

Alamkazi's avatar
New Member
3 years ago

While I am writing test cases. At the time of testing I am facing an issue.

Hi all. Below is my test case code in bdd python. So here I have written the test cases and everything is working fine But i am facing an issue with this error


1.  selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: chrome=94.0.4606.54)


*here is my code*



Feature: Vikreya login

Scenario: Login to vikreya with valid parameter:
Given I launch chrome browser
When i open vikreya web page
And click on login button
And enter username "" and password "aalam@123A"
And click on submit button
Then user successfully login to the web site




from behave import *
from selenium import webdriver

@given('I launch chrome browser')
def launch_Browser(context):
context.driver = webdriver.Chrome()

@when('i open vikreya web page')
def open_vikreya(context):

@when('click on login button')
def click_login_btn(context):

@when('enter username "{user}" and password "{pwd}"')
def input_validate(context, user, pwd):

@when('click on submit button')
def click_submit(context):
context.driver.find_element_by_xpath("//button[contains(text(),'Log In')]").click()

@then('user successfully login to the web site')
def success_lunch(context):
text = context.driver.find_element_by_xpath("//span[contains(text(),'Welcome back! Alam')]").text
assert text == "Welcome back! Alam"