Forum Discussion

ilango's avatar
ilango
Occasional Contributor
9 years ago

How to validate an input box on multiple browsers ?

How to validate an input box on multiple browsers to check whether the input box is displayed fully without any cutoffs at edges? for these input boxes Height and Width are not a static properties.

 

Basically they test should fail if any of changes in the properties while verifying across different browser.

  • cunderw's avatar
    cunderw
    Community Hero

    Open in one browser, store the height/width to variables. Open in new browser and do a property checkpoint for the height/width with the expected result being that variables. 

    • ilango's avatar
      ilango
      Occasional Contributor

      Thanks for your response.

      The height and Width (particular object) are dynamically getting changed while verifying across different browser.

      Example: Login Button , IE 11 , Width 10, Height 15. But in Chrome Width 13, Height 17

      Note: In both browser button displays correctly .

       

      Our requirement is, How to validate the particular object (example: Login Button) displayed completely without overlapping or hiding the partial part of that object?

       

      Login button displayed with half of the portion. since there is a variance in the height and width on each browsers we cant assert by using the height and width.

       

       

       

       

       

      • Colin_McCrae's avatar
        Colin_McCrae
        Community Hero

        I don't test for stuff like this generally.

         

        Especially if it's cross-browser and the browser rendering can alter things. Look and feel stuff like that is too tricky to test accurately with automation software, and too prone to false positives and missed failures due to the fragility of the methods involved.

         

        For what you're describing, you would probably need to know:

         

        Resolution

        Scaling

        Browser size

        Size and position of all available controls on screen

         

        And then do a whole bunch of calculations using all of the above (and probably more) to work out if control A is overlapping onto control B. Nasty. I wouldn't even contemplate it. Or use stored images of the control (with nothing obscured) and resort to image compares. Which are also fragile and prone to false positives.

         

        If the statuses of Exists, Visible, VisibleOnScreen and Enabled are not enough to validate a control, it becomes a "look and feel" test for the manual guys. We don't try and automate absolutely everything. We know it's not possible and some (albeit far less) manual testing will always be required.

         

        If height and width are concrete values. That should ALWAYS return a certain number. Regardless of what is rendering them, then fair enough. I would test for that. But to then ask an automated test "is there part of another control obscuring the top left corner of this button but not rendering it hidden" ... I would not.

         

        Automation is not good for usability or look and feel in my experience.