0

Page File:

class DriveGridPage 

{ 
    static driveName = FileStoreCommonComponent.randomStringGenerator(5) 
} 
export default new DriveGridPage()

Test File:

import DriveGridPage from "../../pom/app_modules/drive/drive_grid_page"

it("Create New Team Drive", () => {
const driveName = DriveGridPage.driveName
DriveGridPage.inputFileOrFolderName('Team Drive - ' + driveName)
})

While running the test, getting "driveName" undefined. How to access static variable "driveName" from my page file?

  • Are you sure that `FileStoreCommonComponent.randomStringGenerator(5)` isn't returning `undefined`? If you hard code a string on driveName, do you see the same issue? – DJSDev Apr 03 '23 at 14:25

0 Answers0