Jump to content

Problems to adopt scripts from selenium


Recommended Posts

Hello,

I am new to AutoIt, it took me only couple of hours to adopt alot of my test scripts from selenium. Thank you Stilgar youre a machine very nice support.

I have searched a long time but could not find a thread where someone describes how to set values ($sText) to forms with xpath.

here is my code where i am stuck on setting the $sText variable to the username box. than two more boxes and a _FFClick to submit the form.

I know from selenium that it runs with xpath but i could not get it to run in ff.au3

Here is the code

#Include <Array.au3>
#Include <FF.au3>



 _FFStart("http://meineipadresse.de/",'aline15',1,"False","127.0.0.1",4344)
     If _FFIsConnected() Then
  
   $sText = _FFXPath("//table[@id='Tabelle1']/tbody/tr[2]/td[3]/p/b", "textContent", 9)
   
      _FFOpenURL ("http://639650.xobor.com/anmeldung.php")
      _FFXPath("//div[@id='pagewidth']/div[2]/div/div/div[2]/div/form/table/tbody/tr/td[2]/input",$sText,"2")
       
      _FFXPath("//div[@id='pagewidth']/div[2]/div/div/div[2]/div/form/table/tbody/tr[3]/td[2]/input","firefox1","2")
    
      _FFXPath("//div[@id='pagewidth']/div[2]/div/div/div[2]/div/form/table/tbody/tr[5]/td[2]/input","firefox1@devfeko.de","2")
      
      _FFClick(_FFXPath("//div[@id='pagewidth']/div[2]/div/div/div[2]/div/form/table/tbody/tr[9]/td[2]/input","",9))
      ;Sleep(10000)
 ;_FFQuit()
     EndIf

Thanks for help have a nice day

sharebeyoid

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