Forgot Password

I have already changed the xpath still its showing same error. I think I also need to add value for this. What do you think?

xpath 1.png

that should be ok or chenge it to: id(‘mail’)

again same error :frowning:

Test Cases/CreateTemEmail FAILED because (of) Unable to get attribute ‘value’ of object ‘Object Repository/Forgot Password/Page_Temp Mail - Disposable Tempora/input_mail’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Forgot Password/Page_Temp Mail - Disposable Tempora/input_mail’ located by ‘By.xpath: id(“mail”)[count(. | //[@value = ‘tidefobum@99pubblicita.com’]) = count(//[@value = ‘tidefobum@99pubblicita.com’])]’ not found)

I think the problem lies on dynamic email which is store in values. everytime the email is getting changed so that’s the reason may be it not found the correct path to store that object.
What do you say @Andrej Podhajský

I have also found error that path is getting underline. I suppose it must have some error but it not reflected anywhere. Please comment on that.

path.png

You can also visit my code again to clear understanding of my script

-----------------------------Test case 1 for creatTemEmail

WebUI.openBrowser(’’)

WebUI.navigateToUrl(‘https://temp-mail.org/en/’)

GlobalVariable.varTemEmail = WebUI.getAttribute(findTestObject(‘Object Repository/Forgot Password/Page_Temp Mail - Disposable Tempora/input_mail’), ‘value’)

println GlobalVariable.varTemEmail

WebUI.waitForPageLoad(5)

WebUI.callTestCase(findTestCase(‘ForgotPassword’),[(‘path’):‘https://www.workilo.com/’])

…ForgotPassword

String currentPage = WebUI.getUrl()

int currentTab = WebUI.getWindowIndex()

WebDriver driver = DriverFactory.getWebDriver()

JavascriptExecutor js = ((driver) as JavascriptExecutor)

js.executeScript(‘window.open();’)

WebUI.switchToWindowIndex(currentTab + 1)

WebUI.navigateToUrl(path)

WebUI.maximizeWindow()

WebUI.waitForElementVisible(findTestObject(‘Page_Workilo Welcome/a_Sign Up (1)’), 0)

WebUI.click(findTestObject(‘Page_Workilo Welcome/a_Sign Up (1)’))

WebUI.click(findTestObject(‘Page_Workilo Welcome/a_Customer (1)’))

//Map CreateTemEmail_called = WebUI.callTestCase(findTestCase(“CreateTemEmail”), [:])

//println CreateTemEmail_called[‘CreateTemEmailVar’]

System.out.println(GlobalVariable.varTemEmail)

WebUI.setText(findTestObject(‘Object Repository/Forgot Password/input_mail’),GlobalVariable.varTemEmail )

nazneen,
problem is in definition of test object of mail address i cannot understand why it still uses value "tidefobum@99pubblicita.com" to search for this input field when i guess e-mail you are getting is different. please double/tripple check how is defined
or better - create one from scratch with just xpath=id(‘mail’)

@Andrej Podhajský

I have created both test cases from scratch also created object repository for create mail and forgot password but still faces the same error.

Test Cases/CreateTemEmail FAILED because (of) Unable to set text ‘yaruc@fxprix.com’ of object ‘Object Repository/Page_Temp Mail - Disposable Tempora/input_mail’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Temp Mail - Disposable Tempora/input_mail’ located by ‘By.xpath: //input[@id=(‘mail’)]’ not found)

Can you please tell me what should be the possible way to avoid this error? I am now totally helpless and clueless :frowning:

nazneen,
i write my own script and try to connect to that service using Katalon, but page did not open…
this could be a root cause:

image.png

@Andrej Podhajský

Now I am using other tem-email “https://www.tempmailaddress.com/

and this time I found this error.Please look into this from the below line of code:

Cases/CreateTemEmail FAILED because (of) Unable to send keys ‘null’ to object ‘Object Repository/Page_Temp Mail - Disposable Tempora/Page_TempMailAddress Disposable Te/span_kamsiyochukwu.macenlron0r’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Temp Mail - Disposable Tempora/Page_TempMailAddress Disposable Te/span_kamsiyochukwu.macenlron0r’ located by ‘By.xpath: //span[@id=‘email’]’ not found)

Andrej Podhajský said:

nazneen,
i write my own script and try to connect to that service using Katalon, but page did not open…
this could be a root cause:

You must use “https://temp-mail.org/” inspite of this “https://temp-mail.org/en/” it also showing error at my side dont know why?

no automation using browser is allowed
check this:
https://www.guerrillamail.com/GuerrillaMailAPI.html

Andrej Podhajský said:

no automation using browser is allowed
check this:
Guerrilla Mail API

what is the use of this site?

it’s free email box site like you were using, but without payment… other sites wants you to pay after some ammount of mail/day recieved.

Oh That’s a great News but I have never used api in my script so can you please guide me how can i use this into my script? how can I initiate script and all.?

one thing … i try to use FF with your script and works … did you run it with chome or firefox?
my script : (i have different variables but script is doing same as your TC1 1st part - get mail

WebUI.openBrowser('https://temp-mail.org/en/')GlobalVariable.testVar = WebUI.getText(findTestObject('__Sandbox/mailInputField'))println GlobalVariable.testVar

Andrej Podhajský said:

one thing … i try to use FF with your script and works … did you run it with chome or firefox?
my script : (i have different variables but script is doing same as your TC1 1st part - get mail


I am using chrome Version 67.0.3396.99

just for test, please try to run it on firefox

So should I need to create object repository in terms of firefox?

I have ran the same script in ff and found the error:

Test Cases/CreateTemEmail FAILED because (of) Unable to click on object ‘Object Repository/Page_Workilo Welcome/a_Sign Up (1)’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Workilo Welcome/a_Sign Up (1)’ located by ‘By.xpath: /html[@class=“ua-windows_nt ua-windows_nt-6 ua-windows_nt-6-3 ua-chrome ua-chrome-67 ua-chrome-67-0 ua-chrome-67-0-3396 ua-chrome-67-0-3396-99 ua-desktop ua-desktop-windows ua-webkit ua-webkit-537 ua-webkit-537-36 js webkit chrome win js”]/body[1]/header[@class=“not-logged-in”]/div[@class=“container clearfix”]/div[@class=“user-actions”]/ul[1]/li[2]/a[@class=“signup-trigger btn-lg”][count(. | //a[@href = ‘javascript:void(0)’ and (text() = ‘Sign Up’ or . = ‘Sign Up’)]) = count(//a[@href = ‘javascript:void(0)’ and (text() = ‘Sign Up’ or . = ‘Sign Up’)])]’ not found)

May be I need to change the object repository acc to FF.

Andrej Podhajský said:

one thing … i try to use FF with your script and works … did you run it with chome or firefox?
my script : (i have different variables but script is doing same as your TC1 1st part - get mail

WebUI.openBrowser('https://temp-mail.org/en/')GlobalVariable.testVar = WebUI.getText(findTestObject('__Sandbox/mailInputField'))println GlobalVariable.testVar

  

Andrej can you share your code with me?

since we are step further,
change definition of ‘Object Repository/Page_Workilo Welcome/a_Sign Up (1)’ to
xpath=//a[text() = ‘Sign Up’]