Unable to click silverlight hyperlinkbutton with windows7

10 posts, 0 answers
  1. Ravi Chandra
    Ravi Chandra avatar
    3 posts
    Member since:
    Jun 2010

    Posted 20 Jul 2010 Link to this post

    Hi There, I'm trying to use silverlight hyperlinkbutton class as below for tests.

    I see below code working for W2k8 and but not for Win7. Anyone hitting the same issue, some seetings need to be changed for win7?

    private SilverlightApp App
    {
        get
        {
            return this.Manager.ActiveBrowser.SilverlightApps()[0];
        }
    }
    private HyperlinkButton Button
    {
        get
        {
            return this.UploadApp.FindName<HyperlinkButton>("_Button");
        }
    }
    public void ClickUpload()
    {
        this.Button.User.Click(); //<<==== this doesn;t fire click for button specified. 
    }

    Thanks,
    Saravanan
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 22 Jul 2010 Link to this post

    Hello Ravi Chandra,

    I cannot explain why the difference in behavior between Win7 and W2k8. The .Click you are using should be moving the mouse to the control and sending a mouse click event at that point. Is the mouse moving to the control? Is it possible the button is in the wrong spot? Do you get an error message when the .Click is called (such as element not found)? Is it possible the click is happening too quickly such that the button isn't ready for to take a click event?

    Kind regards,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Ravi Chandra
    Ravi Chandra avatar
    3 posts
    Member since:
    Jun 2010

    Posted 22 Jul 2010 Link to this post

    It doesnt return any error.
    And the object isnt null as well.

    is there any way we can turn on some logging to understand why its not able to click or what is happening behind the screens (webaii)
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 22 Jul 2010 Link to this post

    Hi Ravi Chandra,

    If the framework was unable to perform the click for any reason an exception would have been thrown. Since you aren't getting an exception, the framework believes it did the click successfully. The best thing to do is to watch the mouse cursor while the test is running. Does it move to the correct location at the correct time? You should see the mouse appear to hover over the center of the button when it's performing the click.

    You could also try turning on Annotation using code like this:

    Manager.Settings.AnnotateExecution = true;

    Once enabled you will see additional highlighting and comments appear in the browser window as the test steps are performed.

    Best wishes,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Ravi Chandra
    Ravi Chandra avatar
    3 posts
    Member since:
    Jun 2010

    Posted 22 Jul 2010 Link to this post

    we call ScrollToVisible before that.

    We have seen that the mouse is on the correct control.
    Will enable the annotation and let you know.
  6. Kiran
    Kiran avatar
    56 posts
    Member since:
    Dec 2008

    Posted 23 Jul 2010 Link to this post

    Hi,

    I assume that the hyperlink click is working manually in windows7.
    Try this also. Am not sure if this solves your issue.

    1. Try to click the button twice
        

     

    Button btnShowPopup = app.Find.ByName<Button>("btnShowPopup");

     

    btnShowPopup.User.Click();

    btnShowPopup.User.Click();


    2. Check whether the silverlight control is activated.If not one extra click will be needed for this
        

     

    //To activate the silverlight control

     

    app.Desktop.Mouse.Click(

    MouseClickType.LeftClick, app.Bounds);

     

  7. Carlos Marcão
    Carlos Marcão avatar
    9 posts
    Member since:
    Jun 2010

    Posted 12 Aug 2010 Link to this post

    Hello.

    I'm facing the same problem with Windows 2008 Server R2 (similar to Windows 7)but with my previous OS version everything ran ok (Windows 2008 Server).

    The problem in my current configuration (Windows 2008 Server R2 + IE8 + VS2008 + Silverlight 3.0 + WebAii 2010.2.713.0) is the same as our collegue. WebAii framework clicks in a wrong place.

    I'm using the following code:

    Button button = _homePagesTab.Find.ByName<Button>("PropertiesBtn");
    button.Highlight();
    button.User.Click(MouseClickType.LeftClick);

    Instruction button.Highlight(); hilights the correct control but click operation isn't executed over desired button.
    I'm attaching a print screen after execute Click method... 
    Additional information: I have one IFrame where is running my Silverlight application. The  black line in the top of the image is my main window. The black spot is the place where framework clicked as response to button.USerClick operation. The red square is the reponse to button.Hilight.

    I think that is an WebAii framework problem. Let me know if I'm wrong. 

    Thanks in advance,

    Carlos Marcão
     
  8. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 13 Aug 2010 Link to this post

    Hello Carlos,

    Have you tried the previous suggestions in this thread? I wonder if the Desktop.Mouse.Click over the button rectangle clicks correctly.

    Also can you please run the latest build of the framework available for download here. Let's make sure that's not a problem we have addressed recently, thank you!

    Finally, is that site available publicly or can you share access to it via a private support ticket? I'd like to play with it and see if I can reproduce the problem.

    Regards,
    Konstantin Petkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Carlos Marcão
    Carlos Marcão avatar
    9 posts
    Member since:
    Jun 2010

    Posted 13 Aug 2010 Link to this post

    Hello. Thank you for your answer.

    I tried to create a project to reproduce the situation... As far as I realized my problem is related with Iframes within IFrames. I created a page with an Iframe that opens another  page with other I frame and finally that IFrame opens a page with the Silverlight application.

    I got the same behaviour as in my application. Hilight operation recognize the control correctly but the Mouse.Click clicks in other area of my page.

    Let me know if this is a known situation and if you have an workaround.
    I have a simple project that reproduces the problem. If you need that project let me know.

    Waiting for your feedback,

    Carlos Marcão
  10. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 13 Aug 2010 Link to this post

    Hello Carlos offerring,

    Yes your test project will be very helpful. Thanks for offering it! No there is no known issue with the scenario you describe. You will need to open a new support ticket to be able to attach a file.

    Kind regards,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top