Absent Member.
Absent Member.
1323 views

How can I get interact between several browsers

Jump to solution

Hi everyone,

I'm using Silktest WorkBench 13.5, WIndows 7 64 bits and vb .net

I have four browsers opened at same time, I can't get toggle between theirs from SilkTest, how can I get a correctly interaction with all browsers opened

I using this lines:

(This get interacction with the first one page, but the second page doesn't work)

Shell("C:\Archivos de programa\Internet Explorer\iexplore.exe " & "http://www.mypage1.com/", vbMaximizedFocus)

System.Threading.Thread.Sleep(15000)

With _desktop.BrowserApplication("webBrowser")

 .SetActive

With .BrowserWindow("browserWindow")

 .DomLink("Quiénes Somos").Click

End With

End With

Shell("C:\Archivos de programa\Internet Explorer\iexplore.exe " & "http://www.mypage2.com/", vbMaximizedFocus)

System.Threading.Thread.Sleep(15000)

With _desktop.BrowserApplication("webBrowser")

.SetActive

With .BrowserWindow("browserWindow")

.DomLink("search").Click

End With

End With

 

Thanks in advanced

0 Likes
1 Solution

Accepted Solutions
Absent Member.
Absent Member.

Hi, a suggestion here would be to create 4 object maps, one for each domain that your browser will navigate to, e.g. ‘webBrowser_mypage1’, ‘webBrowser_mypage2’, and so on.  In each object map add a unique locator path for the required browser window such as one that uses the caption property of the browser, e.g. /BrowserApplication[@caption='mypage1 – Windows Internet Explorer'], or however the caption appears for your websites.

Silk Test 14.0 handles this scenario much better by using a URL pattern based on the websites domain name and creates separate objects for each different URL pattern.  It is now available to download from the SupportLine product updates page..

John

View solution in original post

0 Likes
1 Reply
Absent Member.
Absent Member.

Hi, a suggestion here would be to create 4 object maps, one for each domain that your browser will navigate to, e.g. ‘webBrowser_mypage1’, ‘webBrowser_mypage2’, and so on.  In each object map add a unique locator path for the required browser window such as one that uses the caption property of the browser, e.g. /BrowserApplication[@caption='mypage1 – Windows Internet Explorer'], or however the caption appears for your websites.

Silk Test 14.0 handles this scenario much better by using a URL pattern based on the websites domain name and creates separate objects for each different URL pattern.  It is now available to download from the SupportLine product updates page..

John

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.