Exception : missing ) after argument list

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sholaray
    New Member
    • Feb 2010
    • 2

    Exception : missing ) after argument list

    I understand that the closing parenthesis is required for this kind of error..

    Here is my expression and I don;t see missing anything. Please help!

    selenium.waitFo rCondition(
    "selenium.isEle mentPresent(\"//div[@id='endorsedCa mpaignList']//div[@class='myEndor smentsContainer ']/div[@class='BasicCo ntainer CampaignBoxOffe rRow']//div[@class='MenuBox SubTitle' and @title=\""
    + _global_sponsor _title + "\"]\");", "90000");


    If I run this line: I get the Exception : missing ) after argument list
    Looking forward to your reply.

    Thanks! Shola
  • larztheloser
    New Member
    • Jan 2010
    • 86

    #2
    Code:
    selenium.waitForCondition(
    "selenium.isElementPresent(\"
    //div[@id='endorsedCampaignList']
    //div[@class='myEndorsmentsContainer']
    /div[@class='BasicContainer CampaignBoxOfferRow']
    //div[@class='MenuBoxSubTitle' and 
    @title=\""+ _global_sponsor_title + "\"]\");
    ", "90000");
    Errm - I'm not sure what this code was supposed to do, but if I were a picky browser I'd see the 3 comments and end your expression at the first one. Did you mean to put only one dash, or a "\\"?

    Comment

    • sholaray
      New Member
      • Feb 2010
      • 2

      #3
      oh.. they are not comments.. Its an xpath expression... Okay let me put it this way:
      this is an xpath exp... _global_sponsor _title may contain Strings like either Domino or Domino's Pizza... the problem comes with the apostrophe ' as in 2nd ex... By enclosing the strings within double quotes solves the problem.. But I get the exception as Exception : missing ) after argument list when I run the below exp.. I saw a similar issue in this thread and it says quote placed wrong way, etc... Please help me if my exp is missing any quote or parenthesis.. Thanks!

      (\"//div[@id='endorsedCa mpaignList']//div[@class='myEndor smentsContainer ']/div[@class='BasicCo ntainer CampaignBoxOffe rRow']//div[@class='MenuBox SubTitle' and @title=\""
      + _global_sponsor _title + "\"]\")

      Comment

      Working...