Feature: Login Test
This is Login Test
Scenario: Login with valid login credential testing
Given driver 'https://'
# we can inspect the page and get the locators in different variations like xPath:
# (don't forget to re-arrange the locator's quotes: double outside, single inside)
* driver.maximize()
And input("//input[@id='companyLogin']","SFG_BA")
And input("//input[@id='userName']","sfgapprover")
And input("//input[@id='password']","Ndsb$1234")
# action
When click("//span[normalize-space()='Login']")
# We need to verify: For example webpage we logged in:
Then match driver.title == "StoneX | FXOnline"
* delay(9000)
And match driver.url == 'https://fxonline-demo.stonex.com/Dashboard'
* delay(9000)
And click('{}Initiate Transaction')
* delay(9000)
* delay(9000)
#And match driver.url=='https://fxonline-demo.stonex.com/NewTrade'
And input("//input[@name='amountOne']","777")
* delay(9000)
And leftOf('{}Importation of Goods').click()
And input("//*[@id='inputInternalRef']","sfgapprover")
And click("//a[@href='#']/div[1]")
* delay(9000)
And input("//input[@type='file']", 'C:\Users\murali.gandham\Desktop\Testdata.xlsx')
#* driver.inputFile(//input[@type='file'],'C:\Users\murali.gandham\Desktop\Testdata.xlsx')
And click('{}Continue')
* delay(9000)
And click("//button[@id='btnSave']")
* delay(9000)
No comments:
Post a Comment