Forum Discussion

obaid_shirwani's avatar
obaid_shirwani
Contributor
10 years ago

Cannot click on Web Object that lies beneath the Windows Task Bar

Hello folks,




I am facing an issue. My script simply fills out a web page’s form fields (Textbox, Dropdown list, Date etc) . All goes smooth; all fields get clicked/selected other than this one thing. 


 


1. The field on my web page, that falls right behind the Windows Taskbar <Sys.Process("explorer").Window("Shell_TrayWnd", "", 1)> does not get clicked. 


2. Instead, TestComplete keeps on waiting for the Over Lapped window to get removed.


3. View attached image: OverlappedWindow.bmp


4. All the fields that come after this problematic field get clicked. TestComplete scrolls down the page and those fields get highlighted.


 


I have found a work around but that just a lame work around. If if increase the height of my Windows Taskbar, the field gets clicked. But this is not the solution. 


 


Anyone!


 

2 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Obaid,



    Another possible approach is to execute

    object.ScrollIntoView(False)

    before interacting with the object.

    .ScrollIntoView is a DOM method that is supported by all modern browsers, so it is pretty acceptable workaround.
  • nebti_nassim's avatar
    nebti_nassim
    Occasional Contributor
    Hi,



    You can just scroll down your page before trying to click on your field, that should do the job. But you can also test the visble() property of your object with the [If object] test action and if it return false to you, scroll down your page.



    Hope that will help,



    Nassim