Sign in to follow this  
Followers 0
Valnurat

Dropdown selectmenu

24 posts in this topic

#1 ·  Posted (edited)

Hi

I'm trying to select the content in a dropdown menu in the internet explorer, see attachment, but it is teasing me.

I know I have to pick "enGB"

I can only see this:

<TR>
<TD class="width-40 tableLayoutLabel">Data presentation locale:</TD>
<TD class="width-60 tableLayout2"><SPAN id=modalCreateForm:presentationLocale-outer class="framed inline input required input-t-combobox" tabIndex=0 jQuery15105108932362495449="60" data-max-rows="7"><SPAN class=input-icon-required></SPAN><INPUT id=modalCreateForm:presentationLocale name=modalCreateForm:presentationLocale type=hidden jQuery15105108932362495449="61"><SPAN class="value-showcase-wrapper "><SPAN class=value-showcase>&lt;select&gt;</SPAN></SPAN></SPAN></TD></TR>
<TR>

post-62705-0-80643000-1370255115_thumb.j

Edited by Valnurat

Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites



Do you get any error messages in the SciTE output pane?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Yes, I have tried this:

$oSelect = _IEFormElementGetObjByName($oFormNext3,"modalCreateForm:presentationLocale")
MsgBox(1,1,@error)
$n = _IEFormElementOptionSelect($oSelect, "enGB", 1, "byValue", 1)
MsgBox(1,1,$n)

1st msgbox is 7

2nd msgbox is 0

And the SciTE output pane is

--> IE.au3 V2.4-0 Warning from function _IEFormElementGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.4-0 Error from function _IEFormElementOptionSelect, $_IEStatus_InvalidDataType

If I use the F12=codewindows and press the arrow and point to the "ComboBox" I don't see anything. It do not have any ID or Name or anything.

Don't know if the HTML source can be used, but here it is.

<TD class="width-60 tableLayout2"><SPAN id=modalCreateForm:presentationLocale-outer class="framed inline input required input-t-combobox" tabIndex=0 jQuery15105108932362495449="60" data-max-rows="7"><SPAN class=input-icon-required></SPAN><INPUT id=modalCreateForm:presentationLocale name=modalCreateForm:presentationLocale type=hidden jQuery15105108932362495449="61"><SPAN class="value-showcase-wrapper "><SPAN class=value-showcase>&lt;select&gt;</SPAN></SPAN></SPAN></TD></TR>

Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

Do anyone have an idea?


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

I do hope someone can help me?


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

I have attach 2 pictures showing the source and webpage.

In the source you can see what's marked. That is the "combobox" on the webpage.

I hope someone can help me.

post-62705-0-95134500-1370499684_thumb.j

post-62705-0-60688500-1370499695_thumb.j


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites
Try:
 
$oForm = _IEFormGetCollection($oIE, 0) 
  OR try this one
$oForm = _IEFormGetObjByName($oIE, "autoDetectWidthForm")
 
msgbox(-1,"", isobject($oform))
 
 $element = _IEFormElementGetObjByName($oForm, "modalCreateForm:presentationLocale")
msgbox(-1,"", isobject($element))
 
_IEFormElementOptionSelect($element, "enGB", 1, "byText")

Share this post


Link to post
Share on other sites

Hi,

Maybe the problems come from the non-alphabetic characters. I don't know if they need to be escaped.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

No matter, if I use

$oForm = _IEFormGetCollection($oIE, 0)
OR 
$oForm = _IEFormGetObjByName($oIE, "autoDetectWidthForm")
 
the 1st msgbox says 1
 
2nd msgbox says 0

 

--> IE.au3 V2.4-0 Warning from function _IEFormElementGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.4-0 Error from function _IEFormElementOptionSelect, $_IEStatus_InvalidDataType

 

 

Try:
 
$oForm = _IEFormGetCollection($oIE, 0) 
  OR try this one
$oForm = _IEFormGetObjByName($oIE, "autoDetectWidthForm")
 
msgbox(-1,"", isobject($oform))
 
 $element = _IEFormElementGetObjByName($oForm, "modalCreateForm:presentationLocale")
msgbox(-1,"", isobject($element))
 
_IEFormElementOptionSelect($element, "enGB", 1, "byText")

 

 


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

I really hope someone can give some input to this.


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

I kindly ask for some help to push me in the right direction.


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

Can you upload the html and then describe which part you want to gather/Access via Autoit.

This way it should be easy to help.


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Please, see in post#7


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

Can you upload the html and then describe which part you want to gather/Access via Autoit.

This way it should be easy to help.

 

Post#7

trying to get access to Combobox in the Webpage.

What you see in the Source is what marked on the webpage.


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

#include <IE.au3>
Local $oIE = _IECreate("http://www.syncron.com/")
Local $oInputs = _IETagNameGetCollection($oIE, "span")
Local $sText = ""
For $oInput In $oInputs
 ConsoleWrite($oInput.class & @LF)
 If $oInput.class = "value-showcase" Then
  $sText = $oInput.innerText    ;check the properties in the help files
 EndIf
Next
If $sText <> False Then
 ConsoleWrite("Text: " & $sText & @LF)
 ;do some dirty things with that text!
EndIf
_IEQuit($oIE)

Could help. Check the help files for more informations.

Share this post


Link to post
Share on other sites

#include <IE.au3>
Local $oIE = _IECreate("http://www.syncron.com/")
Local $oInputs = _IETagNameGetCollection($oIE, "span")
Local $sText = ""
For $oInput In $oInputs
 ConsoleWrite($oInput.class & @LF)
 If $oInput.class = "value-showcase" Then
  $sText = $oInput.innerText    ;check the properties in the help files
 EndIf
Next
If $sText <> False Then
 ConsoleWrite("Text: " & $sText & @LF)
 ;do some dirty things with that text!
EndIf
_IEQuit($oIE)
Could help. Check the help files for more informations.

 

Hi

 

Thank you.

 

I have tried to merge this into my existing script.

 

This: ConsoleWrite($oInput.class & @LF) dose not give any result in console windows. It is just blank.

 

You asked me to find the properties for this: $sText = $oInput.innerText    ;check the properties in the help files, but I don't know how to look for $oInput in the helpfile. :ermm: I tried to place the cursor right after the "dot" and pressed CTRL+SPACE and alot of command pops up, but not innertext. :>

I have attach all my code so far.

 

MyCode.au3


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

Ok. I tried this:

 

Local $oElements = _IETagNameAllGetCollection($oIE)
For $oElement In $oElements
 If $oElement.id Then ConsoleWrite("Text: " & "Tagname: " & $oElement.tagname & @CRLF & "id: " & $oElement.id & @CRLF & "innerText: " & $oElement.innerText& @CRLF & @CRLF)
Next

And the result have mulitible content:

Text: Tagname: DIV
id: modalCreateForm:j_idt275
innerText: User interface
International settings
Data presentation locale:<select>
Time zone:None
Language:Auto-detect

Text: Tagname: DIV
id: modalCreateForm:j_idt278
innerText: International settings
Data presentation locale:<select>
Time zone:None
Language:Auto-detect

Text: Tagname: TABLE
id: modalCreateForm:UniqueId_j_id714
innerText: Data presentation locale:<select>
Time zone:None
Language:Auto-detect

Not sure how I should continue with this info.


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

Hope someone can help me.


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0