Jump to content

Dropdown selectmenu


Recommended Posts

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.

Link to comment
Share on other sites

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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.

Link to comment
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")
Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

  • 1 year later...

#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.

Link to comment
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.

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...