How to select an item in a combobox

15 views
Skip to first unread message

shorumi

unread,
Nov 21, 2011, 12:46:21 PM11/21/11
to pyccuracy
Hi there folks,
I´ve just started using pyccuracy and I liked what I saw till now,
congrats for the work done.

However, I have a doubt about combobox, I attempted to access a value
on the combobox through the following regex:

Eu seleciono o item com texto "4" na select "cbDia_DDD_L_LBI3T0"
Eu seleciono o item com valor "4" na select "cbDia"


It´s not working, I just wanna know if the regex I am using to access
a value in a combobox is correct ? or do I need to implement a "Custom
action" to get it.

Regards,
Thiago Felipe Peçanha

Bernardo Heynemann

unread,
Nov 21, 2011, 1:37:08 PM11/21/11
to pyccuracy
Actually you just need to register a custom page with that drop-down:

https://github.com/heynemann/pyccuracy/wiki/Creating-custom-Pages

Cheers,
Bernardo Heynemann

shorumi

unread,
Nov 24, 2011, 3:12:13 PM11/24/11
to pyccuracy
I got it, I was trying to figure out a way to create it through
"Custom pages" as you said.
But my problem is like the following one:

"The majority of unique ID attributes in the HTML will be different
between builds, which causes problems locating elements reliably.
Another issue is selected items from a ComboBox, which is not a normal
HTML <select> element, but an <input> that is populated from data in a
completely separate section of the DOM".

How could I implement this scenario, is that possible ?
Do I need to create a method to click on the down arrow in the right
of the combobox, then another one to get the combobox elements visible
and etc.., inside selenium-driver.py ? and then include a regex for
that and so on ?

Thanks,
Thiago Felipe Peçanha

Reply all
Reply to author
Forward
0 new messages