Jump to content
UBot Underground

Multible If Statements Take Me To Error


Recommended Posts

I get a problem with my dropdown list so i decided to use an if statement with click image to resolve if. But my problem is when i add the 4 img it will not work anymore. I don't know why. 
Anyone an idea what am making wrong? 

The image are numbers: 1,2,3,4

if($contains(1,$next list item(%member_list))) {
        then {
            click($element offset(<class="search">,0),"Left Click","No")
            wait(1)
            click(<image="___IMAGE___11___IMAGE___">,"Left Click","No")
        }
        else if($contains(2,$previous list item(%member_list))) {
            then {
                click($element offset(<class="search">,0),"Left Click","No")
                wait(1)
                click(<image="___IMAGE___12___IMAGE___">,"Left Click","No")
            }
        }
        else if($contains(3,$previous list item(%member_list))) {
            then {
                click($element offset(<class="search">,0),"Left Click","No")
                wait(1)
                click(<image="___IMAGE___14___IMAGE___">,"Left Click","No")
            }
        }
        else if($contains(4,$previous list item(%member_list))) {
            then {
                click($element offset(<class="search">,0),"Left Click","No")
                wait(1)
                click(<image="___IMAGE___18___IMAGE___">,"Left Click","No")
            }
        }
        else {
            wait(1)
        }
    }
Link to post
Share on other sites

Can you elaborate some more? What dropdown list exactly? Is this on a website?

Here a screenshot https://www.dropbox.com/s/x4l6sgu3bo5jq2i/Screenshot%202015-10-06%2022.47.57.png?dl=0

 

And here the HTML Code:

<div class="ui search dropdown selection active visible"><select id="product_id" name="product_id">
                            <option value="">Membership Level </option>
                            <option value="4">1</option><option value="6">2</option><option value="7">3</option><option value="8">4</option>                        </select><i class="dropdown icon"></i><input class="search" tabindex="0"><div class="default text">Membership Level </div><div class="menu transition visible" tabindex="-1" style=""><div class="item" data-value="4">1</div><div class="item" data-value="6">2</div><div class="item" data-value="7">3</div><div class="item" data-value="8">4</div></div></div>
Edited by Domkonit
Link to post
Share on other sites

It's still not really enough to go on, all I can say from this info is that one of the problems may be that inside of your contains you may want to switch around the values so that the list items are in the text field and the numbers are in the text to search for fields.

Link to post
Share on other sites

It's still not really enough to go on, all I can say from this info is that one of the problems may be that inside of your contains you may want to switch around the values so that the list items are in the text field and the numbers are in the text to search for fields.

I solved the problem by disabling the "css" files. Now it's working fine. Thank you

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...