Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7777817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:14:20+00:00 2026-06-01T18:14:20+00:00

I am creating a Python script with Selenium. I want to run a specific

  • 0

I am creating a Python script with Selenium. I want to run a specific test that checks the default text of a textbox when the page loads up. Below is my code…….

try: 
                    self.assertEqual("Search by template name or category..", sel.get_text("//table[@id='pluginToolbarButton_forms']/tbody/tr[2]/td[2]/em"))
                    logging.info('      PASS:  text box text is correct')
                except Exception:
                    logging.exception('     FAIL: text box text is incorrect')

Here is my error……

            self.assertEqual("Search by template name or category..", sel.get_text("//table[@id='pluginToolbarButton_forms']/tbody/tr[2]/td[2]/em"))
  File "C:\Python27\lib\unittest\case.py", line 509, in assertEqual
    assertion_func(first, second, msg=msg)
  File "C:\Python27\lib\unittest\case.py", line 502, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: 'Search by template name or category..' != u'Submitter Requests'

Am I using the wrong function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:14:22+00:00Added an answer on June 1, 2026 at 6:14 pm

    Your AssertionError states that the assertion you tried (that’s the self.assertEqual(...) in your first code example) failed:

    AssertionError: 'Search by template name or category..' != u'Submitter Requests'
    

    This assertion explains that the string 'Search by template name or category' is different from 'Submitter Requests', which is correct … the strings are, in fact, different.

    I would check your second parameter to self.assertEqual and make sure that you’re selecting the right feature.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a python script that runs rsync using subprocess and then gets the
A clueless Python newbie needs help. I muddled through creating a simple script that
I am creating a script using Python Mechanize that can login to a website
I am writing a python script that will be doing some processing on text
I'm working on a python script that opens a logfile, writes specific information to
I want to write a python script that calls some external REST service and
I have python script that uses pysvn and checks out or updates a local
I am creating a Python script within which I am executing UNIX system commands.
I'm creating a indicator applet using Python (pygtk) and I have a function that
I'm creating a python script which accepts a path to a remote file and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.