How to test the application in Google chrome

Asked by shalini

For multibrowser(IE,Firefox,chrome) i have follwed the steps in firefox:
openApp("C:\Program Files\Mozilla Firefox\firefox.exe")
sleep(5)
click("G0toaWebSite.png")
type("http://10.74.28.53:8084/CustomerPortal/Home.jsp")
wait(3)
click("1382691479640.png")

But in chrome click image of loading url is not there .
Please resolve my problm how to load my url in chrome for testing.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

this works for all browsers:
type("l", KeyModifier.CTRL) # lowercase L to focus address input field
paste(some_url)
type(Key.ENTER)

Revision history for this message
shalini (shalini-tiwari01) said :
#2

Hi Raiman
when i typed
type("C:\Program Files\Mozilla Firefox\firefox.exe",KeyModifier.CTRL)
paste("http://10.74.28.53:8084/CustomerPortal/Home.jsp")

sikuli gives error on line 1:
An error occurs at line 1
[error] Error message: Traceback (most recent call last):
 File "C:\Users\shalini_tiwari01\AppData\Local\Temp\sikuli-tmp2965878224352622627.py", line 1, in
 type("C:\Program Files\Mozilla Firefox\firefox.exe", KeyModifier.CTRL)
 at org.sikuli.script.Key.toJavaKeyCode(Key.java:284)
at org.sikuli.script.DesktopRobot.typeChar(DesktopRobot.java:118)
at org.sikuli.script.Region.type(Region.java:810)
at org.sikuli.script.Region.type(Region.java:794)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Cannot convert character

kinldly solve my problem.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

type("C:\Program Files\Mozilla Firefox\firefox.exe",KeyModifier.CTRL)
paste("http://10.74.28.53:8084/CustomerPortal/Home.jsp")

this is not according to my suggestion in comment #1 ???

The usage of type:
http://doc.sikuli.org/region.html#Region.type

Revision history for this message
shalini (shalini-tiwari01) said :
#4

Hi Raiman,
I am not able to getting how to use this
type("l", KeyModifier.CTRL) # lowercase L to focus address input field
paste(some_url)
type(Key.ENTER)
in my script to get the url load on browser.
Please help me.

Thanks
Shalini

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of RaiMan
Sent: Monday, October 28, 2013 4:21 PM
To: Shalini Tiwari01
Subject: Re: [Question #238036]: How to test the application in Google chrome

Your question #238036 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/238036

RaiMan proposed the following answer:
type("C:\Program Files\Mozilla Firefox\firefox.exe",KeyModifier.CTRL)
paste("http://10.74.28.53:8084/CustomerPortal/Home.jsp")

this is not according to my suggestion in comment #1 ???

The usage of type:
http://doc.sikuli.org/region.html#Region.type

--
If this answers your question, please go to the following page to let us know that it is solved:
https://answers.launchpad.net/sikuli/+question/238036/+confirm?answer_id=2

If you still need help, you can reply to this email or go to the following page to enter your feedback:
https://answers.launchpad.net/sikuli/+question/238036

You received this question notification because you asked the question.

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

Revision history for this message
RaiMan (raimund-hocke) said :
#5

You must have somehow the firefox browser window in foreground an activated (the window accepts keystrokes).

the Sikuli snippet:

type("l",KeyModifier.CTRL)
paste("http://10.74.28.53:8084/CustomerPortal/Home.jsp")

# this should select the address field and paste the url

type(Key.ENTER)

# should fire the address

Can you help with this problem?

Provide an answer of your own, or ask shalini for more information if necessary.

To post a message you must log in.