TypeError str object is not callable

0 votes

Hi ,

I am working selenium 4.0 , relative locators . Please let me know why the below code is throwing error
and not identifying the objects.

driver =  webdriver.Chrome(executable_path="C://Python Pro//untitled//CromeDriver//chromedriver.exe")

driver.get("https://www.swtestacademy.com/")
driver.find_element(with_tag_name("article").to_right_of(By.XPATH("//article[1]")))

Error: TypeError: 'str' object is not callable

May 26, 2020 in Selenium by priya
• 120 points
1,062 views
It looks like an issue with your XPath. Have you correctly specified it?
You r not doing anything with the statement. Store it as webelement or do action like click sendkeys etc

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

Selenium Alternatives: Is there a tool like Selenium for testing web pages but which does not involve coding.

I'm guessing you've tried Selenium IDE already. ...READ MORE

answered Apr 13, 2018 in Selenium by king_kenny
• 3,710 points
215 views
+1 vote
5 answers

Getting this error: “Element is not clickable at point”

There are 3 possible solutions for this: 1. ...READ MORE

answered Apr 20, 2018 in Selenium by king_kenny
• 3,710 points
64,103 views
+1 vote
2 answers
0 votes
1 answer

Selenium Exception: Element is not visible

Finding the element before locating the one ...READ MORE

answered May 7, 2018 in Selenium by king_kenny
• 3,710 points
5,702 views
0 votes
1 answer

To check that the web page is loaded or not using Selenium Web Driver?

The solution is using Implicit Wait which ...READ MORE

answered May 24, 2018 in Selenium by Meci Matt
• 9,460 points
17,280 views
0 votes
1 answer

Selenium ChromeBrowser get() method is not working

Make sure you are passing a valid ...READ MORE

answered May 25, 2018 in Selenium by Samarpit
• 5,890 points
1,205 views
0 votes
2 answers

Check that the element is clickable or not in Selenium WebDriver

Hi , you want to know only is ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,010 points
23,473 views
0 votes
2 answers

What is Page Object Model in Selenium WebDriver?

POM is one of design pattern. maintenance  should ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,010 points
535 views