browser getting opened as "Not Secure" connection during selenium execution

59 views
Skip to first unread message

Vikram Verma

unread,
Feb 5, 2018, 11:56:07 PM2/5/18
to Selenium Users
Hi All,
I am executing a piece of code where the new browser window open as not secure. Also, scam pop up windows start opening right next to the intended URL window. I am not able to figure out the linked issue. Everything works fine when I am navigating manually. Also, the issue is not browser or URL specific. I have tried both Mozilla and Chrome with multiple URLs.

 Eclipse Version: 4.7.2
Chrome version: 64
Chrome driver Version: 2.35



Screenshot: 

code:

package jUnitDemo;


import static org.junit.Assert.*;


import java.util.List;
import java.util.concurrent.TimeUnit;


import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.ui.Select;


public class WebelementsTest {
 
 
static WebDriver driver;
 
static String baseURL;
 
String k;


 
@BeforeClass
 
public static void setUpBeforeClass() throws Exception {
 
ChromeOptions options = new ChromeOptions();
 
DesiredCapabilities caps = new DesiredCapabilities();
 options
.addArguments("--disable-popup-blocking");
 caps
.setCapability(ChromeOptions.CAPABILITY, options);
 driver
= new ChromeDriver();
 baseURL
="https://letskodeit.teachable.com/p/practice/";
 
//baseURL="https://google.com";
 driver
.manage().window().maximize();
 driver
.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
 
}
 
 
@Test
 
public void test() throws InterruptedException {
 driver
.get(baseURL);
 
Thread.sleep(5000);
 
WebElement radio = driver.findElement(By.id("bmwradio"));
 radio
.click();
 
boolean t=radio.isSelected();
 
System.out.println(t);
 
 
WebElement lst= driver.findElement(By.id("carselect"));
 
Select sel=new Select(lst);
 sel
.selectByIndex(1);
 
 
//printing the selected options
 
List<WebElement> seloptions= sel.getAllSelectedOptions();
 
for (WebElement opt:seloptions) {
 
 
}
 
 
}


 
@AfterClass
 
public static void tearDownAfterClass() throws Exception {
 
//driver.quit();
 
}


 
}

advanceau...@gmail.com

unread,
Apr 19, 2018, 5:03:42 PM4/19/18
to Selenium Users
Is this issue fixed? 
If so, I'm interested to know how? 
Reply all
Reply to author
Forward
0 new messages