Answered

Error for GET_WEB_Value with "Count" function in xpath

When using "count" function in xpath of a "GET_WEB_VALUE", the system gives below error, however the xpath returns the correct value testing in chrome developer tool.

Error : 
java.util.ArrayList cannot be cast to org.htmlcleaner.BaseToken

Note: This issue is only happening for the test running on NHLBI Public website (which is uses Drupal) and for all other application the "count" works fine.

Note2: This was working before 8.6 version of Subject7

Note2: The error message appear even using "Count" for a very simple html element.

 

0
8 comments
Avatar
Neema Sukumaran

A large number of regression test cases use this feature to get count in various pages.  It was returning count correctly as mentioned(until 8.6 release). It helps to make the test cases responsive to change.  Please respond with a solution

0
Comment actions Permalink
Avatar
Payam Fard

Would you please share the details of the command (i.e. the parameters used by get_web_value command) as it is being used?

0
Comment actions Permalink
Avatar
Hasib Rostaiee

Payam,

The GET_WEB_VALUE is using a locator which is returning a number. Any xpath with "count" is giving this error in this website only. The same command and same type of xpath is working fine in our other java applications,

0
Comment actions Permalink
Avatar
Neema Sukumaran

Hi Payam,

Please see few testcases below

 Home  >>Gamma >> Automated_smoke_regression_TestCases >> nhlbi_gamma_All_News (line 67)

    Home  >>Gamma >> Automated_smoke_regression_TestCases >> nhlbi_gamma_All_events(line 65)

 

I had to remove this command from few testcases to get them run

 

 

 

0
Comment actions Permalink
Avatar
Rex Feizi

Hassib/Neema

We are looking into this issue and will have a fix hopefully by the end of the week. Meanwhile, I would appreciate if you could check the following comments/questions:

  1. Have there been any changes in the application from your side? The last test case passed was in January so over a month. 
  2. The page is full of javascript warnings and issues. The line in our code that is failing is "clean()" which is called to fix issues with HTML documents. So I suspect that there have been changes on the application side. 
  3. The library that we used for parsing is old and we are testing with the new version. We are getting good results so far and I think we will have a patch by the end of the week.  
  4. Also, isn't this application available on the internet? www.nhlbi.nih.gov 

Thanks,

 

--Rex

0
Comment actions Permalink
Avatar
Hasib Rostaiee

Hi Rex,

1) & 2) The passed results are with the step skipped. Issue started to happening after upgrading proof to 8.6. Neema confirmed with developers, that there was no changes around in the application around that time.

4) Yes, the application is the NHLBI public website. But our tests run in lower tiers. The issue appears to exist on www.nhlbi.nih.gov as well.

0
Comment actions Permalink
Avatar
Rex Feizi

Hi Hassib, 

 

Would you please elaborate on "The passed results are with the step skipped"?

 

Based on the info, this seems to be broken even on 8.6.0. Either way, by upgrading the library that "tidy" the HTML page, we have managed to fix the problem. However, I just want to point out that the old library was also present in 8.6.0 and hence, this page with its current format would not have worked on 8.6.0 either. 

0
Comment actions Permalink
Avatar
Hasib Rostaiee

Hi Rex,
I meant the last test which was passed on January, we have skipped this step, so it didn't fail.

It's hard to track the real cause of the issue as few months have passed from the occurrence. Going forward we will try to report issues immediately after finding so the root cause would be found easier.

0
Comment actions Permalink

Please sign in to leave a comment.