This is a migrated thread and some comments may be shown as answers.

Safari RefreshDomTree timing out

3 Answers 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 16 Feb 2012, 05:23 PM

I can open the main login page, and login, however attempting to run a find for an element is failing. Snippet of code in VB:

Public Shared Function WebTagExistsTelerik(ByVal id As String, Optional ByVal browserOrdinal As Integer = 0, Optional ByVal frameOrdinal As Integer = 0, Optional ByVal frameName As String = "", Optional ByVal loglevel As Integer = 3) As Boolean
  
Dim mngr = ScriptLibrary.Globals._BrowserManager
                Dim myElement As Element = Nothing
                For Each Brow In mngr.Browsers
                    'Brow.WaitUntilReady()
                    Brow.RefreshDomTree()
                    Try
                        Brow.Frames.RefreshAllDomTrees()
                    Catch ex As Exception
                    End Try
                Next
                 If id.ToUpper.StartsWith("NAME:") Then
                       myElement = mngr.Browsers(browserOrdinal).Frames(frameOrdinal).Find.ByName(id.Replace("NAME:", ""))
                 Else
                        myElement = mngr.Browsers(browserOrdinal).Frames(frameOrdinal).Find.ById(id)
                  End If

myElement comes back as nothing, as it appears that the DomTree is still our login page. After logging in the page is embedded in a frame.
The WaitUntilReady, RefreshDomTree and RefreshAllDomTrees commands seems to be timing out and not actually refreshing. This code is working in Firefox. Any suggestions?

If I pause the execution before reaching this point and get the outermarkup of frame(0) it doesn't contain the information I would be expecting. It seems to only contain script tags, not any of the HTML expected from the framesrc.

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 22 Feb 2012, 12:44 AM
Hi Jeff,

In your mention Safari, and in your message you state "This code is working in Firefox". I wonder if this is your issue:
http://www.telerik.com/support/pits.aspx#/details/Issue=8974 

Kind regards,
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Jeff
Top achievements
Rank 1
answered on 22 Feb 2012, 03:50 PM
That does appear to be the problem. Since the PIT is marked as resolved, does that mean that it is an issue that will or will not be corrected?
0
Accepted
Cody
Telerik team
answered on 22 Feb 2012, 04:38 PM
Hello Jeff,

It is "resolved" in that we have determined there's nothing we can do. The browser is completely blocking us and we cannot find a way around this brick wall. The browser developers will have to change something on their side to allow us into these unique frames.

Greetings,
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Jeff
Top achievements
Rank 1
Answers by
Cody
Telerik team
Jeff
Top achievements
Rank 1
Share this question
or