- selenium.testing07Regular Participant
- Posts : 26
Join date : 2010-11-20
How to switch another Tab of Firefox when click a link and it will open in another tab?
Mon Dec 13, 2010 8:09 pm
Hi,
In the same case I'm getting an error "warn(1292245359123): Link has target '_blank', which is not supported in Selenium! Randomizing target to be: selenium_blank69196", when i run this code.
Some one please help me out, in this functionality. The goal is simple to move another opened tab to search some text.
This code is in C#
public void TheUntitledTest()
{
selenium.Open("/abc/static/index.html");
// selenium.WindowFocus();
selenium.Click("link=Privacy Statement");
selenium.WaitForPopUp("hello world - Mozilla Firefox", "20000");
selenium.SelectPopUp("hello world - Mozilla Firefox");
selenium.WaitForPageToLoad("30000");
for (int second = 0; ; second++)
{
if (second >= 60) Assert.Fail("timeout");
try
{
if (selenium.IsTextPresent("welcome")) break;
}
catch (Exception)
{
}
Thread.Sleep(1000);
In the same case I'm getting an error "warn(1292245359123): Link has target '_blank', which is not supported in Selenium! Randomizing target to be: selenium_blank69196", when i run this code.
Some one please help me out, in this functionality. The goal is simple to move another opened tab to search some text.
This code is in C#
public void TheUntitledTest()
{
selenium.Open("/abc/static/index.html");
// selenium.WindowFocus();
selenium.Click("link=Privacy Statement");
selenium.WaitForPopUp("hello world - Mozilla Firefox", "20000");
selenium.SelectPopUp("hello world - Mozilla Firefox");
selenium.WaitForPageToLoad("30000");
for (int second = 0; ; second++)
{
if (second >= 60) Assert.Fail("timeout");
try
{
if (selenium.IsTextPresent("welcome")) break;
}
catch (Exception)
{
}
Thread.Sleep(1000);
Re: How to switch another Tab of Firefox when click a link and it will open in another tab?
Mon Dec 13, 2010 9:58 pm
Try to make setting to open all link in new window and then switch to the window.
Tab window is not worked. In firefox tab setting setting uncheck the first option and run your code with windowfocus command to go to new window.
Try this option and sure it will help you.
Tab window is not worked. In firefox tab setting setting uncheck the first option and run your code with windowfocus command to go to new window.
Try this option and sure it will help you.
- selenium.testing07Regular Participant
- Posts : 26
Join date : 2010-11-20
Re: How to switch another Tab of Firefox when click a link and it will open in another tab?
Tue Dec 14, 2010 2:30 pm
Still not success, can you explain with an example?
- selenium.testing07Regular Participant
- Posts : 26
Join date : 2010-11-20
Re: How to switch another Tab of Firefox when click a link and it will open in another tab?
Tue Dec 14, 2010 7:46 pm
Hi,
I search so may blogs and links,
But I did not find proper solution,
its really hack-tic. ufffffffffff
I search so may blogs and links,
But I did not find proper solution,
its really hack-tic. ufffffffffff
- selenium.testing07Regular Participant
- Posts : 26
Join date : 2010-11-20
Re: How to switch another Tab of Firefox when click a link and it will open in another tab?
Tue Dec 14, 2010 11:50 pm
Hi,
I'm using Selenium.getfocus function in following way:
selenium.WindowFocus("Software Testing - Mozilla Firefox", selenium.GetTitle());
Now when I Rebuild the code error comes up:
Error 1 No overload for method 'WindowFocus' takes '2' arguments
I'm using Selenium.getfocus function in following way:
selenium.WindowFocus("Software Testing - Mozilla Firefox", selenium.GetTitle());
Now when I Rebuild the code error comes up:
Error 1 No overload for method 'WindowFocus' takes '2' arguments
- Sponsored content
Permissions in this forum:
You cannot reply to topics in this forum