views:

243

answers:

3

Do any have any experience how this cold be done, if you look at the image im looking for a solution to programacly change the Name field to somehing else stored inn a variable from a other textbox.

i was thinking of using something like

    private void button1_Click(object sender, EventArgs e)
    {
      var xBox = textbox1.value;

      webBrowser1.Document.All.GetElementsByName("Name")[0].SetAttribute("Value", xBox);
    }

but i dont know the name of the Textbox, and Sieble seems to be a java thing? so i cant see the source behind it? does anyone know how to solve this issue. im making a automate app to help at work for handeling over 100 cases a day. Instead of typing the names, im looking for a solution to populate by the click of a button.

I cant handel this by the sieble API because we dont have contorle of the Siebel develompent, and wold take years to get the Sieble department to implement somthing like this in to the GUI. so im making a desktop app that can handel the issue.

alt text

A: 

Sounds like you need to just search through the html (manually) until you find the names/ids of the fields you need to set.

Also, if the site supports Firefox, try using Firebug. In Firebug's inspect mode you can mouse over a text field and get the id of it.

C. Ross
Already tryed that but is i did write."but i dont know the name of the Textbox, and its a java thing so i cant see the source behind it, does anyone know how to solve this issue."
Darkmage
You mean it is a java applet???
C. Ross
seems to be some kind of java yes, the source im able to view from diging araound shows connection to many .js files so i assume the view i looking at is java based, and when i right click on the gray area on the page im getting a diffrent meny then the normal IE meny...the top view look like a datagrid?
Darkmage
Js is javascript, you can script that, but if it's an applet, you might be out of luck ...
C. Ross
its a applet, i disabled the run applet script in IE securety optiens and the right click menu disappeard.what about using cordinates, and simulate keyklicks,,, the boxes will be on teh same spots every time..
Darkmage
It can be done, but at that point I'd suggest it's not worth it, especially in a corporate environment. Have your Siebel team do their jobs ...
C. Ross
A: 

My solution to this was using cordinates, and simulate keys klicks, im using Global Mouse and Keyboard Library for this, found at this location http://www.codeproject.com/KB/system/globalmousekeyboardlib.aspx

private void button1_Click(object sender, EventArgs e)
    {
        this.Location = new Point(0, 0);

        inputBlocker();
        xX = int.Parse(this.Location.X.ToString());
        yY = int.Parse(this.Location.Y.ToString());
        defaultMousePos();
        //Thread.Sleep(600);

       Cursor.Position = new Point(Cursor.Position.X + 1185, Cursor.Position.Y + 254);
       //Thread.Sleep(600);
       MouseSimulator.DoubleClick(MouseButton.Left);
       KeyboardSimulator.KeyPress(Keys.T);
       KeyboardSimulator.KeyPress(Keys.E);
       KeyboardSimulator.KeyPress(Keys.S);
       KeyboardSimulator.KeyPress(Keys.T);
       KeyboardSimulator.KeyPress(Keys.O);
       KeyboardSimulator.KeyPress(Keys.K);
       KeyboardSimulator.KeyPress(Keys.Enter);



       needUnblock = true;
       inputBlocker();

    }
Darkmage
A: 

@Darkmage - Is this a winforms application ?.If so did you not have any issues with loading the siebel activeX controls in the .NET webroswer control?

vanzylv