Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
guriet
Posts : 1
Join date : 2012-04-13

IE browser opening while Running the scripts from Eclipse Empty IE browser opening while Running the scripts from Eclipse

Wed May 02, 2012 8:18 pm
i have Created a script which i need to execute in firefox.when i running that particular script.
i am getting IE browser is opening though i have make firefox as default browser.has anyone faced this issue before
pls help..
rohit13
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 38
Location : INDIA
http://radical-qa.blogspot.in/

IE browser opening while Running the scripts from Eclipse Empty Re: IE browser opening while Running the scripts from Eclipse

Wed May 02, 2012 8:48 pm
Can you please share you script? so that we will get to know better about it.
avatar
Nandu
Posts : 4
Join date : 2012-04-16

IE browser opening while Running the scripts from Eclipse Empty Re: IE browser opening while Running the scripts from Eclipse

Fri May 04, 2012 11:19 am
Even I am also facing the same issue with selenium. I explicitly mentioned browser as firefox but it is opening IE. Please see below for the code



package InfoViewTest;


import com.thoughtworks.selenium.*;
import org.testng.annotations.*;
import static org.testng.Assert.*;
import java.util.regex.Pattern;

public class webiReport extends SeleneseTestNgHelper
{

public void setUp() throws Exception
{
selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://www.google.com/");
selenium.start();
//introducing a delay of 3 seconds between the execution of commands
selenium.setSpeed("6000");
selenium.windowFocus();
selenium.windowMaximize();

}

@Test
public void testWebiReport() throws Exception
{
selenium.open("http://bo-851-sqldb:8080/InfoViewApp/logon.jsp");
for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try { if (selenium.isElementPresent("//input[@id="usernameTextEdit"]")) break; } catch (Exception e) {}
Thread.sleep(10000);
}

selenium.type("//input[@id="usernameTextEdit"]", "administrator");
selenium.type("//input[@id="passwordTextEdit"]", "ca1234");
selenium.click("//input[@type="submit"]");
for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try { if (selenium.isElementPresent("//a[contains(text(),'Document List')]")) break; } catch (Exception e) {}
Thread.sleep(10000);
}

selenium.click("//a[contains(text(),'Document List')]");
for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try { if (selenium.isElementPresent("//span[contains(@id,'ListingURE_treeNode4_name')]")) break; } catch (Exception e) {}
Thread.sleep(10000);
}

selenium.click("//span[contains(@id,'ListingURE_treeNode4_name')]");
for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try { if (selenium.isElementPresent("//div[@title='CA Reports']")) break; } catch (Exception e) {}
Thread.sleep(10000);
}

selenium.doubleClick("//div[@title='CA Reports']");
for (int second = 0;; second++) {
System.out.println("Checking for CCA");
if (second >= 60) fail("timeout");
try { if (selenium.isElementPresent("//div[@title='CCA']")) break; } catch (Exception e) {}
Thread.sleep(10000);

}

selenium.doubleClick("//div[@title="CCA"]");
System.out.println("Clicked CCA");
for (int second = 0;; second++) {
System.out.println("Checking for agent_status");
System.out.println(second);
if (second >= 90) fail("timeout");
try { if (selenium.isElementPresent("//div[contains(@title,"agent_status")]")) break; } catch (Exception e) {System.out.println(e.getMessage());}
Thread.sleep(30000);
}

http://selenium.doubleClickAt("//div[@title="agent_status"]", "");
selenium.doubleClickAt("//div[contains(@title,"agent_status")]", "");
System.out.println("agent_status");
for (int second = 0;; second++) {
if (second >= 100) //fail("timeout");
try { if (selenium.isElementPresent("//span[text()="Enter prompt values."]")) break; } catch (Exception e) {}
Thread.sleep(40000);
System.out.println("eneter prompt");
}

//assertTrue(selenium.isElementPresent("//span[text()="Enter prompt values."]"));
selenium.type("//label[contains(text(),"Report Title")]/following::input", "AGENT STATUS");
selenium.type("//label[contains(text(),"Report Date")]/following::input", "-1");
selenium.type("//label[contains(text(),"Generated By")]/following::input", "chada19");
selenium.type("//label[contains(text(),"Install Directory")]/following::input", "1");
selenium.type("//label[contains(text(),"server_groups")]/following::input", "-1");
selenium.click("//label[contains(text(),"server_groups")]/following::img");
selenium.type("//label[contains(text(),"servers")]/following::input", "-1");
selenium.click("//label[contains(text(),"servers")]/following::img");
selenium.type("//label[contains(text(),"os_names")]/following::input", "");
selenium.click("//label[contains(text(),"os_names")]/following::img");
selenium.type("//label[contains(text(),"service")]/following::input", "");
selenium.click("//label[contains(text(),"service")]/following::img");
selenium.click("//a[@title="OK"]");
}
}
avatar
tarun3kumar
Master
Master
Posts : 186
Join date : 2012-02-14
http://seleniumtests.com

IE browser opening while Running the scripts from Eclipse Empty Re: IE browser opening while Running the scripts from Eclipse

Mon May 07, 2012 11:46 am
Does not seem any thing obviously wrong, you are instantiating firefox -

selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://www.google.com/");

Which version of Selenium are you using?
avatar
Nandu
Posts : 4
Join date : 2012-04-16

IE browser opening while Running the scripts from Eclipse Empty Re: IE browser opening while Running the scripts from Eclipse

Tue May 08, 2012 11:31 am
I am using the latest version of selenium available
i.e., selenium-server-standalone-2.21.0.jar

surprisingly it works when i replace Firefox with chrome. I mean to say it is opening firefox when use chrome instead of Firefox.

Thanks
Nandu
Sponsored content

IE browser opening while Running the scripts from Eclipse Empty Re: IE browser opening while Running the scripts from Eclipse

Back to top
Permissions in this forum:
You cannot reply to topics in this forum