Issue with Login scripts

44 views
Skip to first unread message

Ujjal Goswami

unread,
Jun 8, 2015, 3:30:33 AM6/8/15
to seleniu...@googlegroups.com
Hi All,
       I have written a script for login for our appplication.The code is mentioned below:
package Sample.src;

import com.thoughtworks.selenium.*;
//import java.util.regex.Pattern;

public class login extends SeleneseTestCase {
       public void setUp() throws Exception {
               setUp("http://10.74.21.92:8090/cic", "*iexplore");
       }
       public void testLogin() throws Exception {
               selenium.open("http://10.74.21.92:8090/cic");
               selenium.type("name=password", "cic123");
               selenium.type("name=emailid", "cicu...@abp.in");
               selenium.click("css=button.orange-btn_login");
               selenium.waitForPageToLoad("90000");
               selenium.click("css=img");
               selenium.waitForPageToLoad("90000");
       }
}


But while running the script it is launching the browser and is redirected to a temporary page with the below url instead of the intended application:

file:///C:/Users/Administrator/AppData/Local/Temp/customProfileDire3ff866f45294f6d92af3ce2a2348443/core/Blank.html?start=true


Can anybody please highlight the problems and the solution.

Regards
Ujjal

CH!NN@ K

unread,
Jun 8, 2015, 3:52:18 AM6/8/15
to seleniu...@googlegroups.com
Hi Ujjal Goswami, you can try with below line..I think it is work .

private DefaultSelenium selenium=new DefaultSelenium("localhost",4444,"*firefox","http://techlearn.in/Register");


public class login extends SeleneseTestCase {
       public void setUp() throws Exception {
private DefaultSelenium selenium=new DefaultSelenium("localhost",4444,"*iehta","http://10.74.21.92:8090/cic");
                   }
       public void testLogin() throws Exception {
               selenium.open("http://10.74.21.92:8090/cic");
               selenium.type("name=password", "cic123");
               selenium.type("name=emailid", "cicu...@abp.in");
               selenium.click("css=button.orange-btn_login");
               selenium.waitForPageToLoad("90000");
               selenium.click("css=img");
               selenium.waitForPageToLoad("90000");
       }
}

---
Thanks & Regards,
Purushotham Karimbedu,
Drupal Developer and QA Engineer,
Website for Selenium : http://techlearn.in


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALrU8hzz7YfcmT5x5guSEyVjCT4ba5nhC1h9YUJ6dbLXsQWnrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ujjal Goswami

unread,
Jun 8, 2015, 4:04:55 AM6/8/15
to seleniu...@googlegroups.com
Hi Chinna,
              In the code "  private DefaultSelenium selenium=new DefaultSelenium("localhost",4444,"*iehta","http://10.74.21.92:8090/cic")"it is throwing the following error:

Illegal modified for parameter selenium;only final is permitted.

Regards
Ujjal

Biplab Ghosh

unread,
Jun 8, 2015, 5:12:11 AM6/8/15
to seleniu...@googlegroups.com
Hi Ujjal,

Could you please remove browser cache before running your script.

sent from Mobile...

From: Ujjal Goswami
Sent: ‎08-‎06-‎2015 13:00
To: seleniu...@googlegroups.com
Subject: [selenium-users] Issue with Login scripts

Ujjal Goswami

unread,
Jun 8, 2015, 5:37:35 AM6/8/15
to seleniu...@googlegroups.com
Hi Biplab,
I am getting null pointer exception in the script.

Regards
Ujjal

Biplab Ghosh

unread,
Jun 8, 2015, 5:45:24 AM6/8/15
to seleniu...@googlegroups.com
Ujjal, is it possible to share detailed information. Your code and is details.

Thanks
Biplab

sent from Mobile...

From: Ujjal Goswami
Sent: ‎08-‎06-‎2015 15:07
To: seleniu...@googlegroups.com
Subject: Re: [selenium-users] Issue with Login scripts

Reply all
Reply to author
Forward
0 new messages